Showing items from Maven

Xtext Tip: How to make a DSL generate code from the code generated from another DSL

Sometimes it happens that you have an Xtext DSL that needs generate code to be consumed by another DSL. We can see an example of the need in the question in the Eclipse Forums. This is especially a problem when you use maven to build your projects.

There is a simple solution for that. You can make xtext-maven-plugin generate the code at different phases of the compilation.

In this example we have two DSLs: HelloGen that generates a hello file, and Hello that generates a txt file from a hello file.

Continue Reading