Reference Ecore model in Xtext grammar [message #1848017] |
Wed, 17 November 2021 13:18  |
Eclipse User |
|
|
|
Hello, I am trying to import the Ecore meta model in the xtext grammar so that I can use EPackage.
This is a simple grammar:
grammar org.xtext.Mapping with org.eclipse.xtext.common.Terminals
import "h.ttp://www.eclipse.org/emf/2002/Ecore" as ecore
generate mapping "h.ttp://www.xtext.org/Mapping"
Model:
greetings+=Greeting*;
Greeting:
type = EPackage
;
However on the second line I get this warning:
Quote:
The imported package is not on the classpath of this project
which may lead to follow-up errors.
And on the second to last line I get this error:
Quote:
EPackage cannot be resolved to a rule.
Help on being able to reference an EPackage, would be appreciated.
Thank you.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04518 seconds