Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Type filtering
Type filtering [message #1199518] Wed, 20 November 2013 22:03 Go to next message
aurel pestell is currently offline aurel pestellFriend
Messages: 90
Registered: October 2013
Location: Sweden
Member
Hi,

I am trying to use filtering on the source element of
a Rule, this way:

rule Type_2_DataType {
	from
		f: Xxx!Type (not (f.oclIsTypeOf(Xxx!EnumerationType)))
	to
		p: Ecore!EDataType (
			name <- f.name,
			instanceTypeName <- f.getEquivalentDataType ()
		)
}


But source elements of type Xxx!EnumerationType are still matching that rule.
Am I doing something wrong ?

Thanks,

Aurel
Re: Type filtering [message #1201017 is a reply to message #1199518] Thu, 21 November 2013 14:32 Go to previous messageGo to next message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,
It looks ok to me but then I can't see your meta-model Smile It would be best to attach a workspace with all the required models and a launch configuration.
Regards,
Ronan
Re: Type filtering [message #1201675 is a reply to message #1201017] Thu, 21 November 2013 21:41 Go to previous messageGo to next message
aurel pestell is currently offline aurel pestellFriend
Messages: 90
Registered: October 2013
Location: Sweden
Member
Hey Ronan,

I wish I could do this but I can't unveil much from
my work unfortunately.
What I can say is that:
"Xxx!EnumerationType" has "Xxx!Type" in its "ESuper Types".
(The meta-model is derived from an Xtext Grammar)

The ATL launcher looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2m.atl.adt.launching.atlTransformation">
<stringAttribute key="ATL File Name" value="/com.XXX.XXX/transformations/XXX2Ecore.atl"/>
<stringAttribute key="ATL VM" value="EMF-specific VM"/>
<stringAttribute key="ATL_COMPILER" value="atl2006"/>
<booleanAttribute key="IS_REFINING" value="false"/>
<mapAttribute key="Input">
<mapEntry key="IN" value="XXX"/>
</mapAttribute>
<mapAttribute key="Libs"/>
<mapAttribute key="Model Handler">
<mapEntry key="Ecore" value="EMF"/>
<mapEntry key="XXX" value="EMF"/>
</mapAttribute>
<mapAttribute key="ModelType">
<mapEntry key="Ecore" value="METAMODELOUTPUT"/>
<mapEntry key="IN" value="MODELINPUT"/>
<mapEntry key="XXX" value="METAMODELINPUT"/>
<mapEntry key="OUT" value="MODELOUTPUT"/>
</mapAttribute>
<mapAttribute key="Options">
<mapEntry key="OPTION_CLEAR" value="false"/>
<mapEntry key="OPTION_CONTENT_TYPE" value="false"/>
<mapEntry key="OPTION_DERIVED" value="true"/>
<mapEntry key="allowInterModelReferences" value="false"/>
<mapEntry key="printExecutionTime" value="false"/>
<mapEntry key="step" value="false"/>
<mapEntry key="supportUML2Stereotypes" value="false"/>
</mapAttribute>
<listAttribute key="OrderedInput">
<listEntry value="IN"/>
</listAttribute>
<listAttribute key="OrderedOutput">
<listEntry value="OUT"/>
</listAttribute>
<mapAttribute key="Output">
<mapEntry key="OUT" value="Ecore"/>
</mapAttribute>
<mapAttribute key="Path">
<mapEntry key="Ecore" value="uri:http://www.eclipse.org/emf/2002/Ecore"/>
<mapEntry key="IN" value="/com.XXX.XXX/models/instances/XXX2X3.exp.xmi"/>
<mapEntry key="XXX" value="uri:http://www.XXX.com/XXX"/>
<mapEntry key="OUT" value="/com.XXX.XXX/models/metamodels/XXX2X3.xmi"/>
</mapAttribute>
<stringAttribute key="Port" value="6060"/>
<listAttribute key="Superimpose"/>
</launchConfiguration>


I just replace "sensitive" naming by XXX, I hope it's still readable like this !

Thanks for your help.

Aurel
Re: Type filtering [message #1201713 is a reply to message #1201675] Thu, 21 November 2013 22:04 Go to previous message
aurel pestell is currently offline aurel pestellFriend
Messages: 90
Registered: October 2013
Location: Sweden
Member
Awww, I feel so bad. I was completely confused between types from my Ecore and types from the instance model ...
So in my Rule, "f" is always of type "Xxx!Type".
Should I delete this thread ?
Previous Topic:ANT+ATL with inter-model references
Next Topic:ATL and JAVA code calling (alternative QVT...)
Goto Forum:
  


Current Time: Fri Apr 26 18:19:11 GMT 2024

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

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

Back to the top