The Entities DSL with Xbase

We will ow implement a modified version of the Entities DSL we implemented in Chapter 2, Creating Your First Xtext Language using Xbase. This will allow us to implement a more involved DSL where, inside entities, we can also write operations apart from attributes (this is inspired by the Xtext Domain-Model example).

Creating the project

As usual we create the Xtext project by performing the following steps:

  1. Navigate to File | New | Project..., in the dialog go to the Xtext category and select Xtext Project.
  2. In the next dialog you should specify the following names:
    • Project name: org.example.xbase.entities
    • Name: org.example.xbase.entities.Entities
    • Extensions: xentities
    • Uncheck the option Create SDK feature project

The wizard ...

Get Implementing Domain-Specific Languages with Xtext and Xtend now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.