Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generating code from DSL files in the classpath(How to trigger an xtend generator using DSL files in a referenced jar file or eclipse project)
Generating code from DSL files in the classpath [message #1214053] Wed, 27 November 2013 14:16
Adam Crowther is currently offline Adam Crowther
Messages: 5
Registered: November 2013
Junior Member
Hi all,

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.

Yours,

Adam
Previous Topic:When loading Xtext resources at start, encodingProvider of XtextResource is null.
Next Topic:Deleting unused dependencies in Eclipse
Goto Forum:
  


Current Time: Mon Sep 15 04:14:31 GMT 2014

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

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