Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Code generation
Code generation [message #1008593] Wed, 13 February 2013 03:54 Go to next message
Philippe de Rochambeau is currently offline Philippe de Rochambeau
Messages: 4
Registered: February 2013
Junior Member
Hello,

is it possible to generate Java code using Epsilon?

Many thanks.

Philippe
Re: Code generation [message #1008641 is a reply to message #1008593] Wed, 13 February 2013 06:48 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
Registered: January 2010
Senior Member
The Epsilon Generation Language (EGL) can be used to produce text from models. That text could be HTML, Java code or anything you want. Could you take a look at this page, and chapter 7 of the Epsilon book?

http://eclipse.org/epsilon/doc/egl/

We have some beautifiers for Java code, but you'd need to write most of the code generation process yourself.

Alternatively, you could use a model-to-model transformation (using the Epsilon Transformation Language, for instance) to produce a model of a Java program according to the MoDisco Java metamodel and then save it to a set of .java files. I think MoDisco provides the model-to-text transformation itself. I haven't tried it myself, but it could be useful for you Smile.
Re: Code generation [message #1008652 is a reply to message #1008593] Wed, 13 February 2013 07:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 700
Registered: July 2009
Senior Member
Hi Philippe,

In case it helps, Pongo [1] is an example of a non-trivial Java code generator implemented with EGL.

Cheers,
Dimitris

[1] http://pongo.googlecode.com
Re: Code generation [message #1008828 is a reply to message #1008652] Wed, 13 February 2013 18:28 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
Registered: January 2010
Senior Member
Also incidentally, one of my students did a Java code generator for Hibernate POJOs based on Epsilon:

https://neptuno.uca.es/redmine/projects/uml2hibernate/wiki/English
Re: Code generation [message #1245385 is a reply to message #1008828] Thu, 13 February 2014 13:43 Go to previous messageGo to next message
Ziyaulhaq Aliyu is currently offline Ziyaulhaq Aliyu
Messages: 2
Registered: January 2014
Junior Member
iam a new to empsilon. Start working with EGL, i want to have some kind of EGL examples and the Java code the examples generate. Any link or idea for me to start with EGL is welcome for me. Thanks
Re: Code generation [message #1245436 is a reply to message #1245385] Thu, 13 February 2014 15:16 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 700
Registered: July 2009
Senior Member
Hi,

Have you had a chance to explore the links in the previous posts of this thread?

Cheers,
Dimitris

[Updated on: Thu, 13 February 2014 15:16]

Report message to a moderator

Previous Topic:Concordance documentation
Next Topic:Associte two links with two classes
Goto Forum:
  


Current Time: Fri Apr 18 10:12:16 EDT 2014

Powered by FUDForum. Page generated in 0.02495 seconds