[QVTO] load metamodel programmatically [message #536693] |
Sat, 29 May 2010 21:19  |
Eclipse User |
|
|
|
Originally posted by: vanbeerst.gmail.com
Hi,
I have an ecore metamodel and I am using standalone QVTO.
I add the metamodel to a new registry, with it's NsURI, but my
transformation still complains it can not find the metamodel, which is
defined in the transformation using the same NsURI.
What else do I need to do to load the metamodel in memory?
dear regards,
tony.
|
|
|
Re: [QVTO][SOLVED] load metamodel programmatically [message #536897 is a reply to message #536693] |
Mon, 31 May 2010 09:06  |
Eclipse User |
|
|
|
Originally posted by: vanbeerst.gmail.com
I found the solution myself :).
I was using the UML metamodel, but I forgot to register the pathmaps :
this.registry.put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
Map<URI, URI> uriMap = this.resourceSet.getURIConverter().getURIMap();
URI uri =
URI.createURI(" jar:file:/home/tony/eclipse_helios/eclipse/plugins/org.eclip se.uml2.uml.resources_3.1.0.v201005031530.jar!/ ");
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP),
uri.appendSegment("libraries").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP),
uri.appendSegment("metamodels").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP),
uri.appendSegment("profiles").appendSegment(""));
|
|
|
Powered by
FUDForum. Page generated in 0.04229 seconds