Skip to main content



      Home
Home » Modeling » ATL » toString helper
toString helper [message #1059487] Sun, 19 May 2013 13:04 Go to next message
Eclipse UserFriend

Dears,
I have a helper that's defined as this:

helper context MyPackage!MyClass def: toString() : String = 'Self To String;'


But I need to set a boolean attribute in self (MyPackage!MyClass) to true when the "toString" function is called.
I can't write self.myAttibute=true because my helper returns string.

How can I do this?
Re: toString helper [message #1059689 is a reply to message #1059487] Tue, 21 May 2013 04:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

If you want to set an attribute helper, you have to do it in the "do" section of the corresponding matched rule (e.g.; the one in which your toString helper is actually called).
Re: toString helper [message #1059707 is a reply to message #1059689] Tue, 21 May 2013 06:02 Go to previous messageGo to next message
Eclipse UserFriend

But toString is called from another helper that is called from a query not a rule.
So, is there a way to set an attribute in a helper?
Re: toString helper [message #1059720 is a reply to message #1059707] Tue, 21 May 2013 07:24 Go to previous message
Eclipse UserFriend
Unfortunately, you cannot add "do" sections to ATL queries.
Maybe you could try to express differently inside your query the needed condition.
Previous Topic:How to execute ATL Transformation without using eclipse
Next Topic:implement the model in database
Goto Forum:
  


Current Time: Tue Jul 22 18:16:08 EDT 2025

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

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

Back to the top