|
|
Re: [Acceleo] problem with primitive types when executed as Java application [message #905390 is a reply to message #904402] |
Thu, 30 August 2012 09:49 |
|
Hi,
You should use something like this in the method registerPackages of your generator:
Map uriMap = resourceSet.getURIConverter().getURIMap();
URI uri = URI.createURI("platform:/plugin/org.eclipse.uml2.uml.resources/");
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(""));
But for the stand alone, the path of the jar org.eclipse.uml2.uml.resources is not "platform:/plugin/org.eclipse.uml2.uml.resources/" but the absolute path of the jar.
Regards,
Stephane Begaudeau
|
|
|
Re: [Acceleo] problem with primitive types when executed as Java application [message #1793371 is a reply to message #905390] |
Mon, 06 August 2018 18:25 |
|
Hello Stephane and Laurent
I got the same problem with instances of PrimitiveType, when started to write a Swift code generator from class diagrams built using Papyrus. My class diagram has a number of classes containing properties typed by elements of UML Primitive Types (String and Integer), and when trying to get the names of such primitive types as strings ("String" and "Integer") I got blank, just like Andrea indicated previously. More details on my problem is in this thread: https://www.eclipse.org/forums/index.php/t/1094565/ I am running Acceleo 3.7.3... and Papyrus 4.0.0... on top of Eclipse Photon and my generator is not running as a stand-alone application.
My question is: do I have to modify the registerPackages() method in the Generator.java file? What modifications do I have to do to register the UML Primitive Type package? I am not really understanding this registering stuff and your assistance will be really appreciated.
Thank in advance for your help. Kindest regards.
/TB
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04038 seconds