Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Command line use of Xtext
Command line use of Xtext [message #1009166] Thu, 14 February 2013 15:16
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member

I am looking for the possibilities to run Xtext and generators from the command line. There is a multitude of issues involved, some of which I already solved. I have no solution yet for the following two issues

  1. Cleaning the output. Xtext uses OutputConfigurationProviders to set the output folders and set properties whether or not to clean the output folders. The directory cleaned workflow component is not aware of these p[roviders. To work correctly with Xtext there should be an XTextClean() workflow component that uses the information from the OutputConfigurationProviders to clean the folders that it should clean. Does anyone has such a component, or should I write it myself ?
  2. The Xtext Index iside Eclipse allows me to get access to global information. In a generator I need to generate a list of all model elements of a specific type. These elements may be defined in multiple Xtext files. The only way I see to solve this problem is to access the Xtext Index, which holds information from every Xtext file in its index. However, I have not found how I can access the Xtext Index outside Eclipse. Did I miss something ? Or is this not possible ?

For the following two issues I have found or developed a solution.

  1. Run Xtext on a collection of files that have references to each other using fully qualified names. One Xtext file is easy, but to work with multiple files, there is a need to first ensure that all Xtext files are put into the same resource set. In Spray we wrote our own workflow component doing exactly this. I adapted this solution for my current project.
  2. Running the language formatter on the generated output. I generate output which itself is in a language implemented by Xtext. I want to run the Xtext generated formatter on this generated models. I found no way to run the Xtext formatter from the command line, therefore I developed my own workflow component that runs the Xtext formatter on the generated files.

Did anyone encounter the same questions and has pointers to solutions?

In general it would be great if Xtext would generate everything needed for command line execution out of the box, similar to the way it provides such excellent support for running inside Eclipse.

Regards, Jos
Previous Topic:Import And Scoping
Next Topic:Epackage Import Example - Domainmodel to SecretCompartment
Goto Forum:

Current Time: Sun Feb 23 07:59:54 GMT 2020

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

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

Back to the top