Skip to main content



      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 03:47 Go to next message
Eclipse UserFriend
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 03:48 Go to previous messageGo to next message
Eclipse UserFriend
imho it is a feature that only stuff in source folders gets generated. you may have a look at the BuilderParticipant class

[Updated on: Thu, 23 August 2018 03:48] by Moderator

Re: Generation based on DSL files in classpath [message #1794070 is a reply to message #1794062] Thu, 23 August 2018 04:51 Go to previous messageGo to next message
Eclipse UserFriend
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 05:08 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Generation based on DSL files in classpath [message #1794642 is a reply to message #1794075] Tue, 04 September 2018 08:13 Go to previous message
Eclipse UserFriend
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: Fri Jun 20 18:05:34 EDT 2025

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

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

Back to the top