Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Issue when helper does not match equivalent elements
Issue when helper does not match equivalent elements [message #1220705] Fri, 13 December 2013 08:30 Go to next message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,
I have the following helper which is called from both lazy and matched rules. I have noticed that it always returns the empty OrderedSet{}. The elements returned by the getConstrainedElements() do have equivalents as getPoints() is called on every element in the model.

helper def : getPoints(element : UML!Element) : OrderedSet(UML!Constraint) =
if(thisModule.isDM())
then
OrderedSet{}
else
UML!Constraint.allInstances()->select(e|e.getConstrainedElements()->collect(f|f.getUniqueElementEncoding)->flatten()->includes(element.getUniqueElementEncoding) )
endif;

The UML API is fine but ATL does not match the elements as it thinks they are not the same. If I look at their XMI ID in ATL they also do not match as the element passed in has a unique ID every time instead of the one that it really has in the underlying .uml file. Is there a way of performing such matches correctly?

Regards,
Ronan
Re: Issue when helper does not match equivalent elements [message #1220769 is a reply to message #1220705] Fri, 13 December 2013 13:53 Go to previous messageGo to next message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,
Sorry the code should be a bit simpler to reveal the issue...

helper def : getPoints(element : UML!Element) : OrderedSet(UML!Constraint) =
if(thisModule.isDM())
then
OrderedSet{}
else
UML!Constraint.allInstances()->select(e|e.getConstrainedElements()->includes(element))
endif;

The UML!Constraint.allInstances()->select(e|e.getConstrainedElements()->includes(element))
never finds a match.

Regards,
Ronan
Re: Issue when helper does not match equivalent elements [message #1227033 is a reply to message #1220769] Fri, 03 January 2014 10:42 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,
Does anyone have any insights into this issue?
Regards,
Ronan
Previous Topic:Is there a way to stop a running ATL transformation {and, or} return something to the launcher?
Next Topic:How to create a UML!Type entity and access XSD elements inside WSDLfile
Goto Forum:
  


Current Time: Thu Apr 25 06:12:55 GMT 2024

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

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

Back to the top