作者:啲眼泪17 | 来源:互联网 | 2024-10-08 15:47
本文整理了Java中org.eclipse.emf.ecore.plugin.EcorePlugin.computePlatformURIMap()方法的一些代码示例,
本文整理了Java中org.eclipse.emf.ecore.plugin.EcorePlugin.computePlatformURIMap()
方法的一些代码示例,展示了EcorePlugin.computePlatformURIMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EcorePlugin.computePlatformURIMap()
方法的具体详情如下:
包路径:org.eclipse.emf.ecore.plugin.EcorePlugin
类名称:EcorePlugin
方法名:computePlatformURIMap
[英]Computes a map so that plugins in the workspace will override those in the target platform or the environment and so that plugins with Ecore and GenModels in the target platform or the environment will look like projects in the workspace. It's implemented like this:
return computePlatformURIMap(false);
[中]计算映射,使工作区中的插件覆盖目标平台或环境中的插件,并使目标平台或环境中具有Ecore和GenModels的插件看起来像工作区中的项目。它是这样实现的:
return computePlatformURIMap(false);
代码示例
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
/**
* Computes a map so that plugins in the workspace will override those in the target platform or the environment
* and so that plugins with Ecore and GenModels in the target platform or the environment will look like projects in the workspace.
* It's implemented like this:
*
* return computePlatformURIMap(false);
*
* @deprecated since 2.9;
* use {@link #computePlatformURIMap(boolean) computePlatformURIMap(true)}
* to get the mappings for the target platform,
* or use {@link #computePlatformURIMap(boolean) computePlatformURIMap(false)} to get the legacy behavior, i.e., the mappings for the installed environment.
* It's generally expected that all clients, will migrate to use the target platform.
* @return computes a map so that plugins in the workspace will override those in the environment
* and so that plugins with Ecore and GenModels will look like projects in the workspace.
* @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
* @see #computePlatformPluginToPlatformResourceMap()
* @see #computePlatformResourceToPlatformPluginMap(Collection)
*/
@Deprecated
public static Map computePlatformURIMap()
{
return computePlatformURIMap(false);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
/**
* Computes a map so that plugins in the workspace will override those in the target platform or the environment
* and so that plugins with Ecore and GenModels in the target platform or the environment will look like projects in the workspace.
* It's implemented like this:
*
* return computePlatformURIMap(false);
*
* @deprecated since 2.9;
* use {@link #computePlatformURIMap(boolean) computePlatformURIMap(true)}
* to get the mappings for the target platform,
* or use {@link #computePlatformURIMap(boolean) computePlatformURIMap(false)} to get the legacy behavior, i.e., the mappings for the installed environment.
* It's generally expected that all clients, will migrate to use the target platform.
* @return computes a map so that plugins in the workspace will override those in the environment
* and so that plugins with Ecore and GenModels will look like projects in the workspace.
* @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
* @see #computePlatformPluginToPlatformResourceMap()
* @see #computePlatformResourceToPlatformPluginMap(Collection)
*/
@Deprecated
public static Map computePlatformURIMap()
{
return computePlatformURIMap(false);
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.converter
public static ResourceSet createResourceSet()
{
ResourceSet result = new ResourceSetImpl();
result.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));
return result;
}
代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.junit4
@Before
public void setUp() throws Exception {
resourceSet = new XtextResourceSet();
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(false));
resourceSet.getLoadOptions().put(XMLResource.OPTION_URI_HANDLER, this);
}
代码示例来源:origin: org.eclipse.xtext/ui
protected Map computePlatformURIMap(IJavaProject javaProject) {
HashMap hashMap = newHashMap();
try {
hashMap.putAll(EcorePlugin.computePlatformURIMap(false));
} catch (Exception e) {
LOG.error(e.getMessage(), e);
代码示例来源:origin: org.eclipse/org.eclipse.emf.codegen.ecore.ui
editingDomain.getResourceSet().getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
代码示例来源:origin: org.eclipse/org.eclipse.emf.codegen.ecore
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
URI ecoreURI = URI.createFileURI(ecorePath.toString());
Resource resource = resourceSet.getResource(ecoreURI, true);
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
URI genModelURI = URI.createFileURI(new File(genModelName).getAbsoluteFile().getCanonicalPath());
Resource genModelResource = resourceSet.getResource(genModelURI, true);
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));
URI ecoreURI = URI.createFileURI(ecorePath.toString());
Resource resource = resourceSet.getResource(ecoreURI, true);
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));
URI genModelURI = genModelName.startsWith("platform:/resource/") ? URI.createURI(genModelName) : URI.createFileURI(new File(genModelName).getAbsoluteFile().getCanonicalPath());
Resource genModelResource = resourceSet.getResource(genModelURI, true);
代码示例来源:origin: org.eclipse/org.eclipse.emf.codegen.ecore
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
URI uri = getEcorePackage().eResource().getURI().trimSegments(1).appendSegment(getPrefix() + type + ".xsd");
Resource xsdSchemaResource = resourceSet.createResource(uri);
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore
resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));
URI uri = getEcorePackage().eResource().getURI().trimSegments(1).appendSegment(getPrefix() + type + ".xsd");
Resource xsdSchemaResource = resourceSet.createResource(uri);