We will now implement a simple DSL to model entities, which can be seen as simple Java classes; each entity can have a super type entity (you can think of it as a Java superclass) and some attributes (similar to Java fields). This example is a variant of the domain model example that can be found in the Xtext documentation.
First of all, we will use the Xtext project wizard to create the projects for our DSL (we have already experimented with this at the end of Chapter 1, Implementing a DSL).
Start Eclipse and navigate to File | New | Project.... In the dialog navigate to the Xtext category and select Xtext Project.
In the next dialog you should specify the following names:
Project name:
org.example.entities
Name:
org.example.entities.Entities
Extensions:
entities
Uncheck the option Create SDK feature project (we will use the Create SDK feature project only in Chapter 11, Building and Releasing)
The wizard will create three projects and it will open the...