Switching to an imported Ecore model

During the development of a more complex Xtext DSL, at some point, you might find the automatic Xtext Ecore inference mechanism too restrictive and you might want to have full control on the Ecore model of the AST. The Ecore model is also a very important API to all kinds of Xtext services, which you may want to to control more directly. In such cases, you can decide to switch to an imported and manually maintained Ecore model, starting from the one Xtext inferred for you from the grammar. In this section, we will detail the manual procedure to perform such a switching. we will detail the manual procedure to perform such a switching.

First of all, we create a new DSL that we will use as an example, using the ...

Get Implementing Domain-Specific Languages with Xtext and Xtend - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.