Problem with comparison [message #1755014] |
Sun, 26 February 2017 17:41 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
this if condition return false but When I debug "ve.refImmediateComposite()" and "thisModule.aux" both of them return "IN1!<unnamed>". Would any one help me in this regard?
if (ve.refImmediateComposite() = thisModule.aux)
Member of MDSE Research Group
http://mdse.ui.ac.ir
|
|
|
|
|
|
|
|
Re: Problem with comparison [message #1755701 is a reply to message #1755659] |
Mon, 06 March 2017 21:22 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
louis andia. wrote on Mon, 06 March 2017 16:19It's look like PropertyCallExpression don't have attribute named "method" and yours if don't return any boolean.
Yes, "PropertyCallExpression" doesn't have the attribute named "method". I want to navigate from self to "FOLMethodCallExpression" class which has a "method" feature. "FOLMethodCallExpression" is a sub-class of sub-class of self.
louis andia. wrote on Mon, 06 March 2017 16:19
You wanted to write something like that?
if ((self.oclIsTypeOf(MM_ETL!PropertyCallExpression) or thisModule.isAHelper(self)) and not self.oclIsKindOf(MM_ETL!FOLMethodCallExpression).oclIsUndefined())
then (self.oclIsKindOf(MM_ETL!FOLMethodCallExpression).method.name = 'collect')
else false endif
No, the code I write above is a part of my code. It returns boolean value.
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Mon, 06 March 2017 21:23] Report message to a moderator
|
|
|
|
|
Re: Problem with comparison [message #1755782 is a reply to message #1755758] |
Wed, 08 March 2017 07:12 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
I have also another question, the below if condition always return false.
if (MM_ETL!TransformationRule -> allInstances() -> exists (l|l.lazy=true and l.source.resolvedType.elementName.oclIsKindOf(MM_Src!EStructuralFeature.allInstances() -> select (s|s.name=a.target.collectAllContainedElements()->last().name)-> collect (s|s.eType)->first())))
I think because the below part of it returns "IN_trg!className"
MM_Src!EStructuralFeature.allInstances() -> select (s|s.name=a.target.collectAllContainedElements()->last().name
and the below code returns "className"
MM_ETL!TransformationRule -> allInstances() -> collect (l|l.source.resolvedType.elementName)
I want if the "className" of second part I show is the same as "className" of the first part or one of its subtypes, the if condition returns true. would you please help me in this regard?
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Wed, 08 March 2017 08:14] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03733 seconds