Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generation based on DSL files in classpath
Generation based on DSL files in classpath [message #1794061] Thu, 23 August 2018 07:47 Go to next message
Klaus H. is currently offline Klaus H.Friend
Messages: 14
Registered: July 2009
Junior Member
Hi all,

generating files based on my dsl-file does not work if dsl-file is on the classpath. Is it possible change my configuration/code to get it working?

Details:
MyDSL has two elements defined. One is "base" and the second is "using". In the "using" section of the dsl, element from "base" section are referenced. My generator looks for the "using" section of the dsl. Only if found, he start to generate files. This even works fine if i separate those two parts ("base" and "using") of my dsl into own files.
So everything is fine as long as i have base.mydsl and using.mydsl as part of my eclipse project. Is it possible to get it also working if the base.mydsl is only part of the classpath? If so, how?

Thanks,
klaus
Re: Generation based on DSL files in classpath [message #1794062 is a reply to message #1794061] Thu, 23 August 2018 07:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
imho it is a feature that only stuff in source folders gets generated. you may have a look at the BuilderParticipant class

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 23 August 2018 07:48]

Report message to a moderator

Re: Generation based on DSL files in classpath [message #1794070 is a reply to message #1794062] Thu, 23 August 2018 08:51 Go to previous messageGo to next message
Klaus H. is currently offline Klaus H.Friend
Messages: 14
Registered: July 2009
Junior Member
From my experience with xtext, the dsl file(s) does not need to be in an eclipse source folder. It can be part of any folder of the eclipse project (even in target or bin folder).

Thanks for pointing me in the direction of BuilderParticipant. I'll have a deeper look there. Or even in the XtextBuild itself. Is there an intended way to modify these classes?


Re: Generation based on DSL files in classpath [message #1794075 is a reply to message #1794070] Thu, 23 August 2018 09:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
builderparticipant is language specific and bound in ui module.
the builder itself is shared and thus can only be changed
with overridingGuiceModule extension point and the change will affect all dsls


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Generation based on DSL files in classpath [message #1794642 is a reply to message #1794075] Tue, 04 September 2018 12:13 Go to previous message
Klaus H. is currently offline Klaus H.Friend
Messages: 14
Registered: July 2009
Junior Member
Have to confirm: Using DSLs from the classpath does only work if the DSL that references is also on the classpath (e.g. by putting it into a source folder).

If you have no references to other DSLs, your DSL could be only on the project and not in your source-folders/classpath. Do not get confused..

Thanks
klaus
Previous Topic:Using WS as delimiter in part of grammar
Next Topic:XText Web - assist cancels validation
Goto Forum:
  


Current Time: Sat Nov 17 10:31:54 GMT 2018

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

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

Back to the top