Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate code by Papyrus on Eclipse?

I install Papyrus at here. So how to generate code using Papyrus ?

like image 951
beanhorstmann Avatar asked Aug 20 '11 09:08

beanhorstmann


2 Answers

To generate the java code from UML you can follow the below steps.

  1. New Project->EMF Project Press Next
  2. give the project name
  3. In Model Importer page select UML model and press Next
  4. Select UML model which is created by using Papyrus.Press next
  5. In Package selection page select all the root packages
  6. click finish, it will generate genmodel.
  7. Use the genmodel to generate Java code.

I hope this information helps.

like image 87
babyinEclipse Avatar answered Sep 22 '22 12:09

babyinEclipse


In order to generate any text artifacts from UML models in the Eclipse Modelling Environment (i.e. Papyrus, TopCased, etc.) you should use Acceleo which is an eclipse implementation of the MOF models to text transformation language, the OMG standard language for models to text transformations. It is a very well made technology but it could take some time to become familiar with it especially if you do not know MOF and the Model Driven Architecture.

QVT is another OMG language but its aim is models to models transformations (not models to text). It is therefore not the right answer to your question.

like image 39
Andrea Sindico Avatar answered Sep 22 '22 12:09

Andrea Sindico