|
Re: Need some help to understand the process Papyrus => Acceleo => java code [message #654985 is a reply to message #654937] |
Thu, 17 February 2011 21:27   |
Glenview Jeff Messages: 79 Registered: September 2010 |
Member |
|
|
Without putting too much thought into this response, I would suggest you look at some of the Acceleo tutorials. UPDATE: I just downloaded Papyrus and verified that this works even without changing the default .mtl file.
Instead of creating your own meta-model (skip over this in the tutorials), and instead of instantiating a model from a custom meta-model, you'll use the UML meta-model and the model file you created from Papyrus.
This will come into play during the part where you create a new acceleo project (skip the part where you spawn a new Eclipse session). From Eclipse, Go to File, new, Acceleo Project, next, for the meta-model, click browse and use the UML2 one (I think it should be http://www.eclipse.org/uml2/3.0.0/UML).
For the generate for type field, try creating a generator for "class" type, and see the tutorials for examples on how to create generators.
When you're ready to test your generator, you'll right-click on the "main.mtl" file like you created in the tutorials, and select the papyrus model (the .uml file) you created along with the other parameters mentioned in the tutorials.
Jeff
[Updated on: Thu, 17 February 2011 22:20] Report message to a moderator
|
|
|
|
|
|
Re: Need some help to understand the process Papyrus => Acceleo => java code [message #655158 is a reply to message #654937] |
Fri, 18 February 2011 14:09  |
|
Hi Norbie,
1- Check your run configuration to see if you are generating in the same folder and if you correctly take into account your uml model (Run -> Run Configurations)
2- In the previous version of the Papyrus modeler, I am pretty sure that the generator was based on Acceleo 2 which has a big UML to Java generator created by the CEA, Obeo and other contributors (If I remember correctly). This generator has not been migrated yet in Acceleo 3 because we are currently focusing on the improvement of Acceleo 3 with new features etc.
3- There are two projects :
- "org.eclipse.acceleo.module.example.uml2java.helios" is the Acceleo generator
- "org.eclipse.acceleo.module.example.uml2java.helios.ui" is a eclipse plugin which will create a menu in Eclipse to let you have your generator in your Eclipse without even seeing the generator. It will create a right click action on your *.uml model and you would just have to do right click -> acceleo -> Generate UML to Java.
Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Acceleo wiki: http://wiki.eclipse.org/Acceleo
Blogs: http://stephanebegaudeau.tumblr.com & http://sbegaudeau.tumblr.com
|
|
|
Powered by
FUDForum. Page generated in 0.03469 seconds