Home » Modeling » UML2 Tools » Java code Generation from UML diagrams
Java code Generation from UML diagrams [message #474242] |
Tue, 22 April 2008 01:39 |
Eclipse User |
|
|
|
Originally posted by: msbedwards.comcast.net
Hello.
I'm new to Eclipse and UML modeling. My professor has recommended that we
use Eclipse to develop UML models which will then be used to generate
executable Java code. I've successfully created the models, but am having
problems finding tutorials which explain, in detail, how I would transform
the models into Java code. Could someone suggest a tutorial I could use?
Thank you in advance for the help.
Belinda
|
|
| |
Re: Java code Generation from UML diagrams [message #474246 is a reply to message #474243] |
Wed, 23 April 2008 00:14 |
Eclipse User |
|
|
|
Originally posted by: MsBEdwards.comcast.net
Thank you, Felix.
I'll check this out. I was able to find the "Generating an EMF Model"
tutorial, but it didn't give me exactly what I needed; I'll definately try
this.
Thanks again!
Belinda
|
|
| |
Re: Java code Generation from UML diagrams [message #474399 is a reply to message #474247] |
Wed, 30 April 2008 12:24 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Belinda,
Felix is correct, UML is converted to EMF, Java code is generated from EMF
file.
Diagram is described by two files - semantic model file(*.uml) and notational
model file (*.umlclass_diagram). Notation describes how UML elements a shown
and placed on the diagram; semantic model is UMl model itself, it's what
we will use in our subsequent code generation.
At the moment algorithm to generate Java code from UML diagram is the following:
1. Convert UML to EMF
Select *.uml file and launch New/Eclipse Modeling Framework/EMF model wizard.
Leave 'UML model' as a model importer on the second page.
Click 'Load' button, then click 'Process all' button on the third page.
Press 'Finish' on the forth page.
2. Generate Java from EMF
Open just-created *.genmodel file, select package and call 'Generate Model'
action.
Generated code is what you want. More details about code-generation are in
paper Felix gave ( http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc//references/overview/EMF.html)
Best wishes,
Tatiana.
> Belinda wrote:
>
>> Thank you, Felix.
>> I'll check this out. I was able to find the "Generating an EMF
>> Model"
>> tutorial, but it didn't give me exactly what I needed; I'll
>> definately
>> try this.
> Hey Belinda,
>
> note that EMF/Ecore models are not the same as UML Models. Its a bit
> confusing at first, but you?ll find out.
>
> I?d suggest you to read the EMF Overview, even if you?re going to work
> with UML Models later. The UML2 wiki has some articles that show you
> what?s going on behind the curtain when you draw your diagrams.
>
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc//r
> eferences/overview/EMF.html http://wiki.eclipse.org/MDT-UML2
>
> Felix
>
|
|
| |
Re: Java code Generation from UML diagrams [message #619698 is a reply to message #474243] |
Wed, 23 April 2008 00:14 |
Eclipse User |
|
|
|
Originally posted by: MsBEdwards.comcast.net
Thank you, Felix.
I'll check this out. I was able to find the "Generating an EMF Model"
tutorial, but it didn't give me exactly what I needed; I'll definately try
this.
Thanks again!
Belinda
|
|
| |
Re: Java code Generation from UML diagrams [message #619701 is a reply to message #474247] |
Wed, 30 April 2008 12:24 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Belinda,
Felix is correct, UML is converted to EMF, Java code is generated from EMF
file.
Diagram is described by two files - semantic model file(*.uml) and notational
model file (*.umlclass_diagram). Notation describes how UML elements a shown
and placed on the diagram; semantic model is UMl model itself, it's what
we will use in our subsequent code generation.
At the moment algorithm to generate Java code from UML diagram is the following:
1. Convert UML to EMF
Select *.uml file and launch New/Eclipse Modeling Framework/EMF model wizard.
Leave 'UML model' as a model importer on the second page.
Click 'Load' button, then click 'Process all' button on the third page.
Press 'Finish' on the forth page.
2. Generate Java from EMF
Open just-created *.genmodel file, select package and call 'Generate Model'
action.
Generated code is what you want. More details about code-generation are in
paper Felix gave ( http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc//references/overview/EMF.html)
Best wishes,
Tatiana.
> Belinda wrote:
>
>> Thank you, Felix.
>> I'll check this out. I was able to find the "Generating an EMF
>> Model"
>> tutorial, but it didn't give me exactly what I needed; I'll
>> definately
>> try this.
> Hey Belinda,
>
> note that EMF/Ecore models are not the same as UML Models. Its a bit
> confusing at first, but you?ll find out.
>
> I?d suggest you to read the EMF Overview, even if you?re going to work
> with UML Models later. The UML2 wiki has some articles that show you
> what?s going on behind the curtain when you draw your diagrams.
>
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. emf.doc//r
> eferences/overview/EMF.html http://wiki.eclipse.org/MDT-UML2
>
> Felix
>
|
|
| | |
Goto Forum:
Current Time: Wed Apr 24 15:19:58 GMT 2024
Powered by FUDForum. Page generated in 0.03566 seconds
|