Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365026 - XMI222UMLResourceFactoryImpl does not register ecore2xml
Summary: XMI222UMLResourceFactoryImpl does not register ecore2xml
Status: RESOLVED WONTFIX
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 03:07 EST by Ed Willink CLA
Modified: 2011-12-02 09:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-11-29 03:07:06 EST
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.
Comment 1 Kenn Hussey CLA 2011-12-01 22:29:58 EST
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);
Comment 2 Ed Willink CLA 2011-12-02 09:16:02 EST
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.