Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Changing Source Folders(How to use something different then 'src' and 'src-gen')
Changing Source Folders [message #899760] Thu, 02 August 2012 09:04 Go to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
HI there,

I am currently trying to convert an existing DSL using the current XText version into the shema of another project. Xtext uses the folders 'src' and 'src-gen' as standard folders. Our project followes another convention so we want to use 'src/main/java' and 'src/gen/java'. Is there any simple way of changing the source folders. I cant find any hint where the generators are picking the standard directories from. Crying or Very Sad

Cheers

Phil
Re: Changing Source Folders [message #899818 is a reply to message #899760] Thu, 02 August 2012 12:47 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Phil,

set properties 'srcPath' and 'srcGenPath' to Xtext's Generator component.

component = Generator {
 srcPath = "src/main/java"
 srcGenPath = "src/gen/java"


And... derived sources should normally go below the target folder (target/gen/java), if you already follow Maven project structure conventions Wink

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Changing Source Folders [message #900540 is a reply to message #899760] Tue, 07 August 2012 12:51 Go to previous messageGo to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Thanks...

That worked fine for me... Smile What about the xtend-gen folder... is there a way to redirect it as well? Seems like it is always placed relative to what is set in 'srcpath'.

Cheers

Phil
Re: Changing Source Folders [message #900542 is a reply to message #900540] Tue, 07 August 2012 12:59 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi you should be able to configure it in your projects properties ->
Xtend -> compiler

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:scoping Problem?
Next Topic:Documentation for "new" serializer?
Goto Forum:
  


Current Time: Wed Apr 24 18:32:45 GMT 2024

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

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

Back to the top