Community
Participate
Working Groups
I've developed a UML init that replicates most of the Eclipse init but fall foul of the temporary ResourceSet in XMI222UMLResourceFactoryImpl.createResource that prevents my URI mapping for platform:/plugin/org.eclipse.uml2.uml/ being used for UML30_2_UML.ecore2xml. I cannot avoid the MalformedURLException: unknown protocol: platform Any of the following might fix it: a) for a non-global URIConverter to delegate to the global URI_MAP - perhaps this is a bug in its own right b) for the local ResourceSet to copy the prevailing registrations then add its custom ones - perhaps this would benefit from a ResourceSetImpl clone constructor or EcoreUtil method c) for the Platform stream support to use the EcorePlugin.getPlatformResourceMap
As far as I'm aware, a "non-global" URIConverter _does_ delegate to the global URI map, per the following code in ExtensibleURIConverterImpl: protected URIMap getInternalURIMap() { if (uriMap == null) { URIMappingRegistryImpl mappingRegistryImpl = new URIMappingRegistryImpl() { private static final long serialVersionUID = 1L; @Override protected URI delegatedGetURI(URI uri) { return URIMappingRegistryImpl.INSTANCE.getURI(uri); } }; uriMap = (URIMap)mappingRegistryImpl.map(); } return uriMap; } Is this not happening for you? Are you sure you've registered the proper mapping in the global URI map?
(In reply to comment #1) > As far as I'm aware, a "non-global" URIConverter _does_ delegate to the global > URI map, per the following code in ExtensibleURIConverterImpl: > > Is this not happening for you? Are you sure you've registered the proper > mapping in the global URI map? It depends on which global URI Map you populate: Bug 365515. So solution a) is available.
I guess there's nothing to "fix" in UML2, then.