Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] Couldn't find Model
[XPAND] Couldn't find Model [message #503329] Fri, 11 December 2009 17:20 Go to next message
Wolf Bublitz is currently offline Wolf BublitzFriend
Messages: 3
Registered: December 2009
Junior Member
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 17:21]

Report message to a moderator

Re: [XPAND] Couldn't find Model [message #503332 is a reply to message #503329] Fri, 11 December 2009 17:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [XPAND] Couldn't find Model [message #503371 is a reply to message #503332] Sat, 12 December 2009 13:59 Go to previous messageGo to next message
Wolf Bublitz is currently offline Wolf BublitzFriend
Messages: 3
Registered: December 2009
Junior Member
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 15:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [XPAND] Couldn't find Model [message #503381 is a reply to message #503378] Sat, 12 December 2009 16:10 Go to previous message
Wolf Bublitz is currently offline Wolf BublitzFriend
Messages: 3
Registered: December 2009
Junior Member
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: Fri Apr 19 19:29:54 GMT 2024

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

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

Back to the top