Skip to main content


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 12:48 Go to next message
Dan Barr is currently offline Dan BarrFriend
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 13:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

are you sure the file is in a source folder?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: My generated .java file wont run while in the eclipse application [message #1052741 is a reply to message #1052734] Tue, 30 April 2013 13:23 Go to previous messageGo to next message
Dan Barr is currently offline Dan BarrFriend
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 13:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
i mean is it a java source folder by means of eclipse

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: My generated .java file wont run while in the eclipse application [message #1052798 is a reply to message #1052744] Tue, 30 April 2013 14:45 Go to previous messageGo to next message
Sebastian Koch is currently offline Sebastian KochFriend
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 15:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hmmm i guess you have to digg into jdt api for that.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Repeated value in a grammar rule
Next Topic:Semantic modification via IUnitOfWork brakes grammar
Goto Forum:
  


Current Time: Thu Apr 25 16:11:51 GMT 2024

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

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

Back to the top