Community
Participate
Working Groups
When running standalone, the incomplete initialization of a private ResourceSetImpl in XMI222UMLResourceFactoryImpl.createResource causes failure when reading the working UML 2.5 distribution. At least extensionToFactoryMap.put(Ecore2XMLResource.FILE_EXTENSION, Ecore2XMLResource.Factory.INSTANCE); would appear to be missing.
When running in standalone mode, you are required to programmatically perform all of the registrations that would otherwise be done by plug-in manifests, via the global registries. The file extension registry in the private resource set that you mention will delegate to the global registry, so it should be enough for your code to do this: Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(Ecore2XMLResource.FILE_EXTENSION, Ecore2XMLResource.Factory.INSTANCE);
The problem was in the "platform:" rather than ".ecore2xml" aspect of the access. My ProjectMap had a bug for workspace projects with genmodels; now fixed. The contribution to Bug 364419 successfully puts all the pices in place to allow the UML 2.5 XMI to be opened standalone.