Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 401118 - UMLUtil.init ignores org.eclipse.core.contenttype.contentTypes
Summary: UMLUtil.init ignores org.eclipse.core.contenttype.contentTypes
Status: RESOLVED WONTFIX
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 401119
  Show dependency tree
 
Reported: 2013-02-18 14:13 EST by Ed Willink CLA
Modified: 2013-02-19 16:43 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 2013-02-18 14:13:49 EST
While attempting to develop an examples plugin that contributes the UML 2.5 Beta model, I find that I cannot contribute the new content type and so the usage of 

xmlns:mofext="http://www.omg.org/spec/MOF/20110701"

fails.

Surely the hardwarired contents are for standalone usage. Eclipse usage should exploit the org.eclipse.core.contenttype.contentTypes.
Comment 1 Kenn Hussey CLA 2013-02-18 19:48:17 EST
Can you be more specific about what you think the problem is here? UMLUtil#init(ResourceSet) registers resource factories against content types that have been declared via the 'org.eclipse.core.contenttype.contentTypes' extension point; to add a new content type, you would need to register it via your own extension and then register a resource factory against that content type... are you expecting the utility to automagically do this for you?
Comment 2 Ed Willink CLA 2013-02-19 16:36:04 EST
(In reply to comment #1)
>  are you expecting the utility to automagically do this for you?

Er .. yes.

I was forgetting the nightmarish complexity of the partial registrations.

There appears to be a missing extensibility to define UMLUtil's contentType2resourceFactory; perhaps the content-type declarations should have a ResourceFactory class.

I've concluded that it is impossible to extend MDT/UML2 to redirect a new namespace without modifying the core code. uri-mapping doesn't work for nsURIs and cont registrations are not full extensible.
Comment 3 Kenn Hussey CLA 2013-02-19 16:43:49 EST
Well, this particular utility is intentionally opinionated about what it registers - the set of content types needed to work with the versions of UML, MOF, and XMI that that supported by UML2. I don't see the need to make it extensible.