xtextecore

Creating XTEXT Grammar from existing Ecore Model


I am trying to generate xtext grammar from existing ecore model. The xtext grammar is generated fine. When I do "Generate xtext artifacts" it ends up with "2278 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done."

However, it creates errors in project like in "formatter2" saying "type cannot be resolved". Please see below image for details and guide.

Details

Regards, Misbah.


Solution

  • the java classes for the ecore are missing

    these java classes are not generated automatically, but you need to trigger the creation manually.

    therefore open the genmodel file and do a rightclick generate model code in the root.