Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Following the tutorial, confused on how I actually generate any Java code
Following the tutorial, confused on how I actually generate any Java code [message #1052041] Mon, 29 April 2013 14:49 Go to next message
Dan Barr is currently offline Dan BarrFriend
Messages: 10
Registered: April 2013
Junior Member
Hi,

I have been following the 15 min tutorial and have created my Grammar, generated the artifacts and ran this as a new eclipse application which seems to work fine.

However when I move onto the extended tutorial and create my code generator in the Xtend file and then run my Xtext project as a new eclipse application I don't understand how to generate the Java classes.

The tutorial says 'Now simply create a new source folder src-gen in the that project and see how the compiler will pick up your sample Entities and generate Java code for them.'

I don't understand what I'm missing here or what I need to do to generate the Java code, I just have an empty file in my src folder at the moment.

What exactly do I need to do?

Thanks
Re: Following the tutorial, confused on how I actually generate any Java code [message #1052085 is a reply to message #1052041] Mon, 29 April 2013 15:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

if you have build automatically on the generator will be triggered on save.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Following the tutorial, confused on how I actually generate any Java code [message #1052099 is a reply to message #1052085] Mon, 29 April 2013 16:12 Go to previous messageGo to next message
Dan Barr is currently offline Dan BarrFriend
Messages: 10
Registered: April 2013
Junior Member
Ok

I see in my package explorer the src-gen file which contains my .java files.

However If i try to open these eclipse will just freeze and I have to manually terminate application from the main eclipse application.
Re: Following the tutorial, confused on how I actually generate any Java code [message #1052111 is a reply to message #1052099] Mon, 29 April 2013 16:34 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
maybe you should start runtime eclipse with -XX:MaxPermSize=128m

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Inserting Comments at the Top of an XText Resource at Serialization Time
Next Topic:CompilationTestHelper problem with generated non-java code
Goto Forum:
  


Current Time: Wed Apr 24 15:00:11 GMT 2024

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

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

Back to the top