Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Re: Generate Java code from UML model
Re: Generate Java code from UML model [message #62635] Fri, 19 June 2009 08:54 Go to next message
Eclipse UserFriend
Originally posted by: rafael.abstratt.com

Michael, the UML2 Tools project deals with modeling only. You will find
3 different code generation solutions in the M2T project (which I added
to the CC list): XPand, Acceleo and JET. Here is the project web site:

http://www.eclipse.org/modeling/m2t/

Cheers,

Rafael
http://abstratt.com/blog/

Michael Gebhart wrote:
> Hi,
>
> I've created some UML models (class diagrams) and now, I want to
> generate the Java code skeletons. Is this possible?
>
> I've tried to convert the UML models to an Ecore model and gen model and
> generated the Java code. But now, I have my classes that inherit from
> EObject and the code contains a lot of annotations. I only want to
> generate plain Java objects. Is this possible with the Eclipse UML Tools
> (I am already testing the Galileo release). Or is there an open source
> plug-in available?
>
> Greetings
>
> Michael
Re: Generate Java code from UML model [message #62658 is a reply to message #62635] Fri, 19 June 2009 21:52 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Michael,

what you have done is, you've created an Ecore-based DSL of your model.
In this case, your UML instance model was converted into a arbitrary
metamodel (M2). What you wanted to do is to generate code out of UML
instance model.

Therefore, as Rafael mentioned, there are severals projects, but none
out-of-the-box-solution. I can recommend JET2 and Acceleo. I've worked
with both and they are feasible for your problem.

HTH
/Timothy

Rafael Chaves schrieb:
> Michael, the UML2 Tools project deals with modeling only. You will find
> 3 different code generation solutions in the M2T project (which I added
> to the CC list): XPand, Acceleo and JET. Here is the project web site:
>
> http://www.eclipse.org/modeling/m2t/
>
> Cheers,
>
> Rafael
> http://abstratt.com/blog/
>
> Michael Gebhart wrote:
>> Hi,
>>
>> I've created some UML models (class diagrams) and now, I want to
>> generate the Java code skeletons. Is this possible?
>>
>> I've tried to convert the UML models to an Ecore model and gen model
>> and generated the Java code. But now, I have my classes that inherit
>> from EObject and the code contains a lot of annotations. I only want
>> to generate plain Java objects. Is this possible with the Eclipse UML
>> Tools (I am already testing the Galileo release). Or is there an open
>> source plug-in available?
>>
>> Greetings
>>
>> Michael
Re: Generate Java code from UML model [message #62681 is a reply to message #62658] Mon, 22 June 2009 09:22 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040206070205090400000006
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

there is a light example of doing this under the acceleo examples.

Just install Acceleo, right click on the .uml file, and you would be
able to generate java sources files.


Cheers,



Timothy Marc a
Previous Topic:[MOFScript] How to specify an enumeration literal in an expression?
Next Topic:[Announce] M2T XPAND 0.7.0 is available
Goto Forum:
  


Current Time: Sat Nov 09 04:59:34 GMT 2024

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

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

Back to the top