Community
Participate
Working Groups
In this forum thread problems were reported which indicated that after reading an UML model the root object was of type AnyType: http://www.eclipse.org/forums/index.php?t=rview&goto=557414#msg_557414 After some analysis it turned out that the UML model used declared the namespace for UML 2.1.0. This version seems to require a different Resource for reading, the org.eclipse.uml2.uml.resource.UML212UMLResource class. Next problem is a required URI mapping for standalone execution. For models with NS URI xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" the following mappings must be done: ExtensionMap: from = uml to = org.eclipse.uml2.uml.resource.UML212UMLResource URI Map from = platform:/plugin/org.eclipse.uml2.uml/model/UML21_2_UML.ecore2xml to = EcoreUtil2.getURI("model/UML21_2_UML.ecore2xml").toString() I think a good way to add these mappings is to add a property 'version' for the uml2 Setup class. Setting a concrete value won't change the default behavior except for version 2.1.x. For 2.1.x the above mappings are applied. Pseudo Code: public void setUmlVersion (String version) { if (version.matches("2\\.1\\.\\d")) { addExtensionMap(new Mapping("uml", "org.eclipse.uml2.uml.resource.UML212UMLResource ")); addUriMap(new Mapping("platform:/plugin/org.eclipse.uml2.uml/model/UML21_2_UML.ecore2xml", EcoreUtil2.getURI("model/UML21_2_UML.ecore2xml").toString())); } }
This one was already fixed on 2010-11-19 (b0c1773ec6d957814e31aac0ad3075c925899c9b)
Bug resolved before Xpand 1.2 release date => Closing