Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Code generation
Code generation [message #1008593] Wed, 13 February 2013 08:54 Go to next message
Philippe de Rochambeau is currently offline Philippe de RochambeauFriend
Messages: 40
Registered: February 2013
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 11:48 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
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 12:35 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
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 23:28 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
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 18:43 Go to previous messageGo to next message
Ziyaulhaq Aliyu is currently offline Ziyaulhaq AliyuFriend
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 20:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
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 20:16]

Report message to a moderator

Re: Code generation [message #1838570 is a reply to message #1245436] Mon, 01 March 2021 16:44 Go to previous messageGo to next message
Usman O is currently offline Usman OFriend
Messages: 1
Registered: March 2021
Junior Member
Hi there,

I was also interested in creating a tool that could generate similar java files (with slightly different constraints), and the examples linked in this discussion are broken links. Are there any examples you could link that I could take a look at as I've had quite the problem finding examples.

Many thanks,
Usman
Re: Code generation [message #1838578 is a reply to message #1838570] Mon, 01 March 2021 19:00 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Usman,

Does this article help?

https://www.eclipse.org/epsilon/doc/articles/code-generation-tutorial-egl/

Thanks,
Dimitris
Previous Topic:Xtext integration with GMF
Next Topic:Problem using append in EGX
Goto Forum:
  


Current Time: Fri Apr 26 11:45:00 GMT 2024

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

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

Back to the top