Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL Generic Type Helper ?
ATL Generic Type Helper ? [message #1831132] Wed, 12 August 2020 08:44 Go to next message
Burak Karaduman is currently offline Burak KaradumanFriend
Messages: 84
Registered: July 2018
Member
Dear All,


Is there a way to define a helper as generic.

I need a helper where all passed elements need to check its own eContainer named "Platform" then return true. I could not find a way.

Moreover, I tried to make something like. self.eContainer(PIM!Platform) for each rules' source condition but PIM!Platform did not recognized.

Can you advise a method to solve this ?
Re: ATL Generic Type Helper ? [message #1831139 is a reply to message #1831132] Wed, 12 August 2020 09:42 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

You can try this:
helper context OclAny def :  isContainedByPlatform : Boolean =
  if self.oclIsUndefined() then
    false
  else
    self.eContainer().oclIsKindOf(PIM!Platform)
  endif;


Cheers,
Dennis

[Updated on: Wed, 12 August 2020 09:42]

Report message to a moderator

Re: ATL Generic Type Helper ? [message #1831154 is a reply to message #1831139] Wed, 12 August 2020 13:51 Go to previous message
Burak Karaduman is currently offline Burak KaradumanFriend
Messages: 84
Registered: July 2018
Member
Thanks Dennis, it works !
Previous Topic:How to Conditional Transformation in Rules ?
Next Topic:How to certain rules with entered paramter to an Attribute?
Goto Forum:
  


Current Time: Sat Apr 20 01:40:08 GMT 2024

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

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

Back to the top