Xtext from ecore model error - couldn't resolve reference to EPackage [message #1707273] |
Thu, 03 September 2015 12:01 |
Elvis Dowson Messages: 65 Registered: December 2011 |
Member |
|
|
Hi,
I tried to create a new Xtext project from an existing ecore model, but I get the following error in my Library.xtext file.
Couldn't resolve reference to EPackage 'http://www.emf.com/examples/library'.
I've aded the following entries to my GenerateLibraryDsl.mwe2 file, but the error still persists:
GenerateLibraryDsl.mwe2 file snippet:
Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
registerGeneratedEPackage = "com.emf.examples.library.model.library.LibraryPackage"
registerGenModelFile = "platform:/resource/com.emf.examples.library/model/library.genmodel"
registerEcoreFile = "platform:/resource/com.emf.examples.library/model/library.ecore"
}
LibraryDsl.xtext file contents:
// automatically generated by Xtext
grammar org.xtext.example.librarydsl.LibraryDsl with org.eclipse.xtext.common.Terminals
import "http://www.emf.com/examples/library"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
Library returns Library:
{Library}
'Library'
name=EString
'{'
('authors' '{' authors+=Author ( "," authors+=Author)* '}' )?
('books' '{' books+=Book ( "," books+=Book)* '}' )?
'}';
Author returns Author:
{Author}
'Author'
name=EString
'{'
('books' '(' books+=[Book|EString] ( "," books+=[Book|EString])* ')' )?
'}';
Book returns Book:
{Book}
'Book'
name=EString;
EString returns ecore::EString:
STRING | ID;
I have attached the library.ecore and library.genmodel files.
Regards,
Elvis Dowson
[Updated on: Thu, 03 September 2015 12:01] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03615 seconds