ecl ant task doesn't "see" inherited elements from a metamodel [message #1171746] |
Tue, 05 November 2013 12:56 |
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
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02528 seconds