Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » helper (ATL)
helper [message #1312157] Thu, 24 April 2014 05:57 Go to next message
saber trimech is currently offline saber trimechFriend
Messages: 1
Registered: April 2014
Junior Member
I created a metamodel with EMF, which I need to make a Helper that allows verféier two classes of the same package will not have the same name.

Re: helper [message #1414820 is a reply to message #1312157] Mon, 01 September 2014 11:12 Go to previous message
Zheng Cheng is currently offline Zheng ChengFriend
Messages: 15
Registered: February 2012
Junior Member
Hi

It might not be precise as you want, but here is the general idea:

helper context SomeMetamodel!Classifier def: isNotSameName(another: SomeMetamodel!Classifier) : Boolean = 
   if self.Package.name = another.Package.name and self.name <> another.name then
      true
   else
      false
   endif;



You can make the above helper more robust by check Package is not [undefined] on the classifier.
Previous Topic:specifying multiple source pattern in ATL
Next Topic:Initialize a Map to be empty
Goto Forum:
  


Current Time: Thu Mar 28 13:07:23 GMT 2024

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

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

Back to the top