Skip to main content



      Home
Home » Modeling » ATL » problem in helper
problem in helper [message #1075558] Mon, 29 July 2013 12:27 Go to next message
Eclipse UserFriend
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 12:35 Go to previous messageGo to next message
Eclipse UserFriend
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 12:50 Go to previous messageGo to next message
Eclipse UserFriend
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 12:58 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 02:12:30 EDT 2025

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

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

Back to the top