Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to run the UML code generator?
How to run the UML code generator? [message #477969] Fri, 14 November 2008 12:53 Go to next message
Iris Groher is currently offline Iris GroherFriend
Messages: 33
Registered: July 2009
Member
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!
Re: How to run the UML code generator? [message #477971 is a reply to message #477969] Fri, 14 November 2008 15:18 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Iris,

The tutorial
http://www.eclipse.org/modeling/mdt/uml2/docs/tutorials/Ecli pseCon2008_Tutorial_Creating_Robust_Scalable_DSL_with_UML.ht ml
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@gmx.at> wrote in message
news:3224d02ef139c99d17ece0fe8d5e5d67$1@www.eclipse.org...
> 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!
>
Re: How to run the UML code generator? [message #627188 is a reply to message #477969] Fri, 14 November 2008 15:18 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Iris,

The tutorial
http://www.eclipse.org/modeling/mdt/uml2/docs/tutorials/Ecli pseCon2008_Tutorial_Creating_Robust_Scalable_DSL_with_UML.ht ml
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@gmx.at> wrote in message
news:3224d02ef139c99d17ece0fe8d5e5d67$1@www.eclipse.org...
> 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!
>
Previous Topic:How to run the UML code generator?
Next Topic:Stereotypes parameters
Goto Forum:
  


Current Time: Mon Apr 06 03:12:43 GMT 2020

Powered by FUDForum. Page generated in 0.02039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top