Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » My generated .java file wont run while in the eclipse application
My generated .java file wont run while in the eclipse application [message #1052712] Tue, 30 April 2013 08:48 Go to next message
Dan Barr is currently offline Dan Barr
Messages: 10
Registered: April 2013
Junior Member
Hi,

I have setup the xText example file statemachine, when I run the example as a new eclipse application and generate the .java file from it everything seems to go as expected.

however when I then try to run this file i get an error, 'editor does not have a main'

However if i copy and paste the generated java code into a new project it will run fine, how can I compile and run the code straight from the example without needing to manually copy + paste it into a new file?
Re: My generated .java file wont run while in the eclipse application [message #1052734 is a reply to message #1052712] Tue, 30 April 2013 09:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6225
Registered: July 2009
Senior Member
Hi,

are you sure the file is in a source folder?
Re: My generated .java file wont run while in the eclipse application [message #1052741 is a reply to message #1052734] Tue, 30 April 2013 09:23 Go to previous messageGo to next message
Dan Barr is currently offline Dan Barr
Messages: 10
Registered: April 2013
Junior Member
Yeah, it's been created in the src-gen folder
Re: My generated .java file wont run while in the eclipse application [message #1052744 is a reply to message #1052741] Tue, 30 April 2013 09:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6225
Registered: July 2009
Senior Member
i mean is it a java source folder by means of eclipse
Re: My generated .java file wont run while in the eclipse application [message #1052798 is a reply to message #1052744] Tue, 30 April 2013 10:45 Go to previous messageGo to next message
Sebastian Koch is currently offline Sebastian Koch
Messages: 1
Registered: April 2013
Location: Poland
Junior Member
Hi

BTW Can Xtext somehow create eclipse source folder automatically? For the first time i have do this always manually?
Re: My generated .java file wont run while in the eclipse application [message #1052811 is a reply to message #1052798] Tue, 30 April 2013 11:02 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6225
Registered: July 2009
Senior Member
Hmmm i guess you have to digg into jdt api for that.
Previous Topic:Repeated value in a grammar rule
Next Topic:Semantic modification via IUnitOfWork brakes grammar
Goto Forum:
  


Current Time: Wed Aug 27 13:06:15 EDT 2014

Powered by FUDForum. Page generated in 0.02055 seconds