O'Reilly logo

Implementing Domain-Specific Languages with Xtext and Xtend by Lorenzo Bettini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required