[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: How to run the UML code generator?

Hi Iris,

The tutorial 
http://www.eclipse.org/modeling/mdt/uml2/docs/tutorials/EclipseCon2008_Tutorial_Creating_Robust_Scalable_DSL_with_UML.html
might shed some light on this.
There is also a cheat-sheet for step by step walk-through .. see the wiki 
for more details: http://wiki.eclipse.org/MDT-UML2

It sounds like you want to start modifyng the code generation templates 
however.   Please have a look at org.eclipse.uml2.codegen.ecore\templates.

* org.eclipse.uml2.uml is where you can find the bulk of the UML2 API.  It 
contains the generated code.
* The codegen.ecore contains customized codegen templates and genmodel 
extensions.
* The codegen.ui contains item providers for the extended genmodel options.

To re-run code generation on uml you can start with the UML.genmodel in the 
org.eclipse.uml2.uml\model directory and regenerate from there.  All the 
models from which the API is generated can be found in that model directory.

Cheers,
- James.


"Iris Groher" <Iris.Groher@xxxxxx> wrote in message 
news:3224d02ef139c99d17ece0fe8d5e5d67$1@xxxxxxxxxxxxxxxxxx
> Hi all,
>
> If I want to change the UML code generator, what is the best way to 
> proceed? I have several projects in my workspace (org.eclipse.uml2.uml, 
> org.eclipse.uml2.codegen.ecore, org.eclipse.uml2.codegen.ecore.ui) and I 
> do not know which one to change if I want to add some additional code to 
> e.g. all getters of some specific UML element. Also, how can I re-run the 
> code generator then?
>
> Thank you so much for your help!
>