Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Reference Ecore model in Xtext grammar
Reference Ecore model in Xtext grammar [message #1848014] Wed, 17 November 2021 12:53
Jan Crkvic is currently offline Jan CrkvicFriend
Messages: 18
Registered: November 2021
Junior Member
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.
Previous Topic:Xtext builder stops eclipse build
Next Topic:Reference Ecore model in Xtext grammar
Goto Forum:
  


Current Time: Fri Sep 30 06:44:07 GMT 2022

Powered by FUDForum. Page generated in 0.02190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top