|Generating code from DSL files in the classpath [message #1214053]
||Wed, 27 November 2013 14:16
| Adam Crowther
Registered: November 2013
I have implemented 3 related Xtext projects in Eclipse, each of which generates Java code for a family of applications that use a common Xtext model. One of the projects ("Core") contains the central DSL files and generates Java framework code that is common to all of my application runtimes, including objects that are exchanged between the applications. The other Eclipse projects reference and use the framework that is generated by the Core project, and in turn generate additional application specific Java code.
I have implemented the language and the generators, and it all works nicely if I duplicate the DSL files in each of the application projects. Obviously I want to avoid this duplication, so my question is this: how do I configure a generator so that it uses DSL files that are found in a specific package on the classpath, and are not necessarily in the same project?
I have already spent a couple of days digging through the documentation and the forums, so far without any luck. I did see this post - message 1061937 - which seems to address a similar topic, but I'm not sure where to implement the ResourceSet code that is discussed there.
When I get this running in Eclipse I will integrate the Xtext code generation in Maven.
I would really appreciate any hints or pointers I can get on this. Many thanks in advance for any help you can offer.
Powered by FUDForum
. Page generated in 0.01469 seconds