Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not found)
Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not found) [message #523489] Fri, 26 March 2010 15:21 Go to next message
Christoph Wienands is currently offline Christoph WienandsFriend
Messages: 55
Registered: July 2009
Member
Hey guys,

I'm trying to run an .eol file via Ant. I already made sure that it runs in
the sam JRE as Eclipse.

The eol script acts on an Ecore metamodel. Therefore, I'm using expressions
like "Ecore!EPackage.allInstances". However, when I run it, I get this
exception:

[epsilon.eol - adaptMetamodel.eol] EXCEPTION: Type 'Ecore!EPackage' not
found (C:\...\myproject\transformation\adaptMetamodel.eol@7:17)
[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.TypeExecutor.execute(TypeExe cutor.java:90)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.NameExecutor.execute(NameExe cutor.java:81)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.NameExecutor.execute(NameExe cutor.java:124)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:185)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:36)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:123)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:185)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.ForStatementExecutor.execute (ForStatementExecutor.java:44)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:185)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te(StatementBlockExecutor.java:33)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:185)

[epsilon.eol - adaptMetamodel.eol] at
org.eclipse.epsilon.eol.EolModule.execute(EolModule.java:57)

....



Here is the Ant script that I'm using:

<epsilon.emf.loadModel name="EcarDslModel"
modelfile="${basedir}/../model/fbx.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore" read="true"
store="true" />


<epsilon.eol src="adaptMetamodel.eol">

<model ref="EcarDslModel" />

</epsilon.eol>



I believe the either the localModel or the eol task don't load the
underlying Ecore metametamodel, which my metamodel is based on. FYI, I can
successfully execute the eol script via an EOL runtime configuration, where
I configured the ecore model as input.



Any suggestions are appreciated.



Thanks, Christoph
Re: Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not foun [message #523493 is a reply to message #523489] Fri, 26 March 2010 15:31 Go to previous messageGo to next message
Christoph Wienands is currently offline Christoph WienandsFriend
Messages: 55
Registered: July 2009
Member
Never mind. I got a knot in my brain and mixed up model names. Obviously,
the name I'm assigning while loading the model needs to be the same as when
I pass the model to the eol script.

<epsilon.emf.loadModel name="Ecore"
modelfile="${basedir}/../model/fbx.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore" read="true"
store="true" />

<epsilon.eol src="adaptMetamodel.eol">
<model ref="Ecore" />
</epsilon.eol>

Greetings, Christoph
Re: Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not foun [message #523499 is a reply to message #523493] Fri, 26 March 2010 15:40 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Christoph,

Glad you got this working! FYI if you prefer to access the model using a
different name in your EOL program you can use the "as" attribute in
your <model> nested element i.e. <model ref="Ecore" as="SomeOtherName"/>

Cheers,
Dimitris

Christoph Wienands wrote:
> Never mind. I got a knot in my brain and mixed up model names. Obviously,
> the name I'm assigning while loading the model needs to be the same as when
> I pass the model to the eol script.
>
> <epsilon.emf.loadModel name="Ecore"
> modelfile="${basedir}/../model/fbx.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore" read="true"
> store="true" />
>
> <epsilon.eol src="adaptMetamodel.eol">
> <model ref="Ecore" />
> </epsilon.eol>
>
> Greetings, Christoph
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not foun [message #587794 is a reply to message #523489] Fri, 26 March 2010 15:31 Go to previous message
Christoph Wienands is currently offline Christoph WienandsFriend
Messages: 55
Registered: July 2009
Member
Never mind. I got a knot in my brain and mixed up model names. Obviously,
the name I'm assigning while loading the model needs to be the same as when
I pass the model to the eol script.

<epsilon.emf.loadModel name="Ecore"
modelfile="${basedir}/../model/fbx.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore" read="true"
store="true" />

<epsilon.eol src="adaptMetamodel.eol">
<model ref="Ecore" />
</epsilon.eol>

Greetings, Christoph
Re: Problem with epsilon.eol: Does not resolve referenced metamodels (Type 'Ecore!EPackage' not foun [message #587806 is a reply to message #523493] Fri, 26 March 2010 15:40 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Christoph,

Glad you got this working! FYI if you prefer to access the model using a
different name in your EOL program you can use the "as" attribute in
your <model> nested element i.e. <model ref="Ecore" as="SomeOtherName"/>

Cheers,
Dimitris

Christoph Wienands wrote:
> Never mind. I got a knot in my brain and mixed up model names. Obviously,
> the name I'm assigning while loading the model needs to be the same as when
> I pass the model to the eol script.
>
> <epsilon.emf.loadModel name="Ecore"
> modelfile="${basedir}/../model/fbx.ecore"
> metamodeluri="http://www.eclipse.org/emf/2002/Ecore" read="true"
> store="true" />
>
> <epsilon.eol src="adaptMetamodel.eol">
> <model ref="Ecore" />
> </epsilon.eol>
>
> Greetings, Christoph
>
>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Previous Topic:EVL file not getting called?
Next Topic:tracing source/code from model developed in euginea based editor
Goto Forum:
  


Current Time: Sun Dec 21 13:01:14 GMT 2014

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

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