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: 6534
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 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: 6534
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 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: 6534
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 Dec 17 21:43:19 GMT 2014

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

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