Creating XTEXT Grammar from existing Ecore Model

415 Views Asked by At

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.

1

There are 1 best solutions below

5
Christian Dietrich On BEST ANSWER

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.