Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » problem in helper
problem in helper [message #1075558] Mon, 29 July 2013 16:27 Go to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 28
Registered: November 2012
Junior Member
Hi,

I have a lazy rule and this lazy rule calls a helper. Although I pass the elements of input model to this helper, It checks for both elements of input and output and it stops with OUT! <unnamed>.
Before, that I use a helper in a rule not lazy rule, was fine. Is it because that I defined it in a lazy rule?

Thanks
Re: problem in helper [message #1075562 is a reply to message #1075558] Mon, 29 July 2013 16:35 Go to previous messageGo to next message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 28
Registered: November 2012
Junior Member
here is the helper:

helper context MM! Dependency
def: findCM (): Set (MM! Association) =
MM!Association.allInstances()->select (e|e-> debug ('CM').hasStereotype('PRO1::CM') and
and e.endType -> at (1) =self.client -> at(1)

);

How I can specify that allInstances () should be calculated only for input elements not output elements?
Re: problem in helper [message #1075569 is a reply to message #1075562] Mon, 29 July 2013 16:50 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 523
Registered: July 2009
Senior Member
I think there's a declinaison of allInstances that allows to specifiy precisely for which model you're asking all the instances.
This should be
allInstancesFrom('model name')

Btw you can remove the () in the helper name, that way it does cache for the helper and it behaves just like a property so it's only calculated once for each element and not re-computed afterwards.
Re: problem in helper [message #1075573 is a reply to message #1075569] Mon, 29 July 2013 16:58 Go to previous message
Jeni Martin is currently offline Jeni MartinFriend
Messages: 28
Registered: November 2012
Junior Member
Thank you very much Indeed. Now it works Smile
Previous Topic:EMF operation invocation in an ATL module
Next Topic:cannot transform all suppliers in dependency
Goto Forum:
  


Current Time: Sat Nov 29 02:53:11 GMT 2014

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

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