Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] Can't find references to metamodel from template
[XPAND] Can't find references to metamodel from template [message #764663] Mon, 12 December 2011 16:05 Go to next message
Dennis  is currently offline Dennis Friend
Messages: 1
Registered: December 2011
Junior Member

I have followed the "getting started" tutorial for creating xpand generator from here: I have created the ecore metamodel and generated java code. Then I loaded this project into the runtime and created Xpand project. When I get to the point of specifying the template I get an error "Can't find data:DataModel".

From another tutorials I found that I have to copy my .ecore model to the same src folder where I have my template. When I did that the error disappeared and it could find the model classes.
This is the first time I am using XPand and my question is do I have to always copy my .ecore file to the same folder as the template? Can I reference it differently?

Thanks in advance,
Re: [XPAND] Can't find references to metamodel from template [message #764763 is a reply to message #764663] Mon, 12 December 2011 20:06 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

The EPackage of your metamodel must be known. This can be achieved by generating the EMF classes and use the org.eclipse.emf.ecore.generated_package extension point, e.g. like this:
   <extension point="org.eclipse.emf.ecore.generated_package">

Then your metamodel will be known in your UI.


Need professional support for Xtext, EMF, Eclipse IDE?
Go to:
Twitter : @kthoms
Blog :
Previous Topic:[Xpand] Access EAnnotations
Next Topic:[Acceleo] Start a module with a SET parameter
Goto Forum:

Current Time: Sat May 21 13:42:58 GMT 2022

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

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

Back to the top