Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ecl ant task doesn't "see" inherited elements from a metamodel
ecl ant task doesn't "see" inherited elements from a metamodel [message #1171746] Tue, 05 November 2013 12:56 Go to next message
giovi disanto is currently offline giovi disanto
Messages: 58
Registered: September 2011
Member
Hi guys,
I have an ecl task working pretty good by invoking it through an ecl run configuration. Problems arise when I invoke it by an ant task in which another egl task is involved.
My ecl code takes two models in input. One of them inherits some Attributes and References form another metamodel.
In my ecl code I have "for" statements cycling on eAllAttributes and eAllReferences getting attributes of the current Eclass and attributes of the inherited one as well.
This mechanism doesn't work when i launch the process by executing the ant script and the ecl code is able to see only EAttributes and EReferences directly belonging to the metamodel in input.
I tried also to load the "base" metamodel through a loadmodel task and to register it but it doesn't make the trick.

Here is my ant file:

<project default="main">
<target name="main">
	
	<epsilon.emf.register file="../org.ossmeter.repository.model/model/ossmeter.ecore"/>
	
	<epsilon.loadModel name="ApiModel" type="EMF">
		<parameter name="modelFile" value="../org.eclipse.egit.github.core/github_java.xmi"/>
		<parameter name="metamodelUri" value="http://www.eclipse.org/MoDisco/Java/0.2.incubation/java"/>
		<parameter name="readOnLoad" value="true"/>
	</epsilon.loadModel>
	
	<epsilon.loadModel name="Ossmeter" type="EMF">
				<parameter name="modelFile" value="../org.ossmeter.repository.model/model/ossmeter.ecore"/>
				<parameter name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
				<parameter name="readOnLoad" value="true"/>
	</epsilon.loadModel>
	
	<epsilon.loadModel name="CustomModel" type="EMF">
			<parameter name="modelFile" value="../org.ossmeter.repository.model.github/model/github.ecore"/>
			<parameter name="metamodelUri" value="http://www.eclipse.org/emf/2002/Ecore"/>
			<parameter name="readOnLoad" value="true"/>
	</epsilon.loadModel>
	
	<epsilon.ecl src="ossmeter.ecl" exportmatchtrace="eclMatchTrace">
			<model ref="ApiModel"/>
			<model ref="CustomModel"/>
			<model ref="Ossmeter" />
	</epsilon.ecl>
	
	<epsilon.egl src="ossmeter.egl" target="/home/nino/Projects/eclipse_epsilon_kepler/org.ossmeter.repository.injector/src/org/ossmeter/repository/injector/GithubInjector.java">
			<uses ref="eclMatchTrace" as="eclMatchTrace"/>	
			<model ref="ApiModel"/>
			<model ref="CustomModel"/>
	</epsilon.egl>
	
</target>
</project>



The "base" metamodel is ossmeter. I tried also to pass a reference of Ossmeter metamodel to the ecl task even if it isn't required.

[Updated on: Tue, 05 November 2013 12:57]

Report message to a moderator

Re: ecl ant task doesn't "see" inherited elements from a metamodel [message #1180086 is a reply to message #1171746] Sun, 10 November 2013 19:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 877
Registered: July 2009
Senior Member

Hi,

Could you please put together a minimal example [1] we can use to reproduce this?

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/minimal-examples/
Re: ecl ant task doesn't "see" inherited elements from a metamodel [message #1181478 is a reply to message #1180086] Mon, 11 November 2013 16:29 Go to previous messageGo to next message
giovi disanto is currently offline giovi disanto
Messages: 58
Registered: September 2011
Member
I have sent a minimal example right now. Unfortunately i couldn't provide a simple metamodel example but the ecl code is very simple.

Hoping it can be useful...

Cheers,

Giovanni
Re: ecl ant task doesn't "see" inherited elements from a metamodel [message #1192108 is a reply to message #1181478] Sun, 17 November 2013 11:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 877
Registered: July 2009
Senior Member
Hi Giovanni,

In your loadModel task you need to add the following parameter:

<parameter name="expand" value="true"/>

Cheers,
Dimitris
Re: ecl ant task doesn't "see" inherited elements from a metamodel [message #1198815 is a reply to message #1192108] Wed, 20 November 2013 14:21 Go to previous message
giovi disanto is currently offline giovi disanto
Messages: 58
Registered: September 2011
Member
Hi Dimitris,
I replied to your email about 2 days ago. I'm going to put a copy of it there for being sure you will see it and for providing this information into the forum too.
When we'll find a solution it could be useful for someone else with the same problem.

"Hi Dimitris,
Sorry for being such a disturb but I have tried with this parameter right now and it seems it didn't make the trick. Probably it's due to my execution environment. I'm going to send to you my installation details hoping they can help you.

Any way my os is Xubuntu 13.10 and I'm running that Java version:

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)


Best regards,

Giovanni"

Previous Topic:Evaluation - get all the elements that are linked to selected element within a collection
Next Topic:[SOLVED][EGL] Problem with using XML formatter
Goto Forum:
  


Current Time: Thu Oct 02 08:35:44 GMT 2014

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

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