Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] Couldn't find Model
[XPAND] Couldn't find Model [message #503329] Fri, 11 December 2009 12:20 Go to next message
Eclipse UserFriend
Hi,

I am new to the XText->Xpand Modeling Mechanism and after doing the tutorial from the XText Documentation I am trying to create a small DSL on my own.

This is my current XText Grammar, which works as I expected:
grammar org.xtext.Mathset with org.eclipse.xtext.common.Terminals

generate mathset "http://www.xtext.org/Mathset"

Model:
	set1=Set "+" set2=Set;
	
Set:
	"{}" | "{" (elements+=Element)+ "}";
		
Element:
	value=INT;


My Template looks like:
«IMPORT mathset»;

«DEFINE main FOR Model»
«ENDDEFINE»


But "Model" is red underlined with the message "Couldn't find Model".
Sad Sad Sad

Can someone please help me?

Thanks!

[Updated on: Fri, 11 December 2009 12:21] by Moderator

Re: [XPAND] Couldn't find Model [message #503332 is a reply to message #503329] Fri, 11 December 2009 12:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello, vou get this error message cant find you Metamodel and therefore cannot verify that there is a MetaClass "mathset::Model". to tell Xpand where to find / search your MetaModel you have to do only two things

(1) tell xpand what kind of metamodel you are using. In Your case this would be EMF Metamodels (In your projects Properties go to the Xtend/Xpand section and verify if EMF MetaModels is selected (should be default)

(2) the (generated) .ecore file has to be on the classpath of your xpand project. therefor add a plugin-dependeny to your generator projects manifest file.
Re: [XPAND] Couldn't find Model [message #503371 is a reply to message #503332] Sat, 12 December 2009 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

first of all thanks for your reply.

In my generator-project's properties there is no "EMF MetaModels" to choose, it looks like this:

http:// picasaweb.google.de/lh/photo/k4U8r6960FvXYgKm_TFA-A?feat=dir ectlink

The manifest's plugin list looks like this:

http:// picasaweb.google.de/lh/photo/gg6N7lBt9mK-Dvr3GIInNA?feat=dir ectlink

Can you please tell me where to find this .ecore file?

Re: [XPAND] Couldn't find Model [message #503378 is a reply to message #503371] Sat, 12 December 2009 10:32 Go to previous messageGo to next message
Eclipse UserFriend
hi,

if you cannot see emf metsmodels in the configuration your xpand installation seems to be incomplete. to you use a distribution as you can get it e.g. from here. the ecore file is generated by the xtext worklow e.g. to /org.xtext.mathset/src-gen/org/xtext/Mathset.ecore
Re: [XPAND] Couldn't find Model [message #503381 is a reply to message #503378] Sat, 12 December 2009 11:10 Go to previous message
Eclipse UserFriend
After downloading this version of Eclipse is seems to work, may be I have forgotten to install some plugin in my regular Eclipse.

Thanks a lot! Razz
Previous Topic:[Acceleo] Watch expression in the debugger ?
Next Topic:migrating from oaw: Workflow problems
Goto Forum:
  


Current Time: Sun Jul 06 21:47:06 EDT 2025

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

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

Back to the top