/** * Returns a map from {@link EPackage#getNsURI() package namespace URI} (represented as a String) * to the location of the GenModel containing a GenPackage for the package (represented as a {@link URI URI}). * <p> * It's implemented like this: *<pre> * return getEPackageNsURIToGenModelLocationMap(false); *</pre> * </p> * @return a map from package namespace to GenModel location. * @deprecated since 2.9; * use {@link #getEPackageNsURIToGenModelLocationMap(boolean) getEPackageNsURItoGenModelLocationMap(true)} * to get the locations in the target platform, * or use {@link #getEPackageNsURIToGenModelLocationMap(boolean) getEPackageNsURItoGenModelLocationMap(false)} to get the legacy behavior, i.e., the locations in the installed environment. * It's generally expected that all clients, will migrate to use the target platform. */ @Deprecated public static Map<String, URI> getEPackageNsURIToGenModelLocationMap() { return getEPackageNsURIToGenModelLocationMap(false); }
/** * Returns a map from {@link EPackage#getNsURI() package namespace URI} (represented as a String) * to the location of the GenModel containing a GenPackage for the package (represented as a {@link URI URI}). * <p> * It's implemented like this: *<pre> * return getEPackageNsURIToGenModelLocationMap(false); *</pre> * </p> * @return a map from package namespace to GenModel location. * @deprecated since 2.9; * use {@link #getEPackageNsURIToGenModelLocationMap(boolean) getEPackageNsURItoGenModelLocationMap(true)} * to get the locations in the target platform, * or use {@link #getEPackageNsURIToGenModelLocationMap(boolean) getEPackageNsURItoGenModelLocationMap(false)} to get the legacy behavior, i.e., the locations in the installed environment. * It's generally expected that all clients, will migrate to use the target platform. */ @Deprecated public static Map<String, URI> getEPackageNsURIToGenModelLocationMap() { return getEPackageNsURIToGenModelLocationMap(false); }
/** * {@inheritDoc} * * @see org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl#resolve(URI) */ @Override public URI resolve(URI uri) { // platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass Map<String, URI> map = EcorePlugin.getEPackageNsURIToGenModelLocationMap(); URI trimmedURI = uri.trimFragment(); Set<Entry<String, URI>> entries = map.entrySet(); for (Entry<String, URI> entry : entries) { URI dummyValue = entry.getValue(); String dummy = dummyValue.toString(); if (dummy.endsWith("genmodel")) { //$NON-NLS-1$ dummy = dummy.substring(0, dummy.length() - "genmodel".length()); //$NON-NLS-1$ dummy = dummy + "ecore"; //$NON-NLS-1$ } if (dummy.equals(trimmedURI.toString())) { URI newURI = URI.createURI(entry.getKey()); newURI = newURI.appendFragment(uri.fragment()); // http://www.eclipse.org/emf/2002/Ecore#//EClass return newURI; } } return super.resolve(uri); } }
result.putAll(computePlatformResourceToPlatformPluginMap(new HashSet<URI>(EcorePlugin.getEPackageNsURIToGenModelLocationMap(false).values())));
result.putAll(computePlatformResourceToPlatformPluginMap(new HashSet<URI>(EcorePlugin.getEPackageNsURIToGenModelLocationMap(false).values())));
URI genModelURI = EcorePlugin.getEPackageNsURIToGenModelLocationMap().get(nsURI); if (genModelURI != null)
URI genModelURI = EcorePlugin.getEPackageNsURIToGenModelLocationMap(true).get(nsURI); if (genModelURI != null)
Map<String, URI> ePackageToGenModelMap = EcorePlugin.getEPackageNsURIToGenModelLocationMap(true); for (TreeIterator<EPackage> i = new EcoreUtil.ContentTreeIterator<EPackage>(getEPackages())
public static Resource getGenModelResource(final String locationInfo, final String nsURI, final ResourceSet resourceSet) { final URI genModelURI = EcorePlugin.getEPackageNsURIToGenModelLocationMap(false).get(nsURI); if ((genModelURI == null)) { boolean _equals = Objects.equal(EcorePackage.eNS_URI, nsURI);
new GeneratedPackageRegistryReader(getEPackageNsURIToGenModelLocationMap(false)).readRegistry(); new DynamicPackageRegistryReader().readRegistry(); new FactoryOverrideRegistryReader().readRegistry();
new GeneratedPackageRegistryReader(getEPackageNsURIToGenModelLocationMap(false)).readRegistry(); new DynamicPackageRegistryReader().readRegistry(); new FactoryOverrideRegistryReader().readRegistry();