Getting the current rule's name [message #897263] |
Mon, 23 July 2012 08:52  |
Eclipse User |
|
|
|
Good afternoon.
I have a question regarding the access to metadata from a
transformation. I want to base the generation of some names on the
current rule's name, but I want to specify this in a super rule, and use
inheritance.
So, the question would be, is there a reflective instruction (or some
other means) to access the current rule's metadata?
I'm sorry if this is stated somewhere in the documentation, but I was
not able to find it.
Thanks in advance for your answers.
Regards,
JP
|
|
|
|
Re: Getting the current rule's name [message #899314 is a reply to message #898444] |
Tue, 31 July 2012 09:01  |
Eclipse User |
|
|
|
Hi Ronan.
Great tip, I'll may just do that.
Thanks for your answer.
Regards,
JP
El 26/07/2012 13:51, Ronan B escribió:
> Hi,
> I know you can get the Module name using thisModule.toString() but
> getting the rule name isn't possible I think. Instead you can use a work
> around. Assuming the usual naming convention for rules of
> SourceElementName+'To'+TargetElementName you can use the following
> generic ATL to get the rule name :)
> (s.oclType().name+'To'+t.oclType().name)
>
> Regards,
> Ronan
|
|
|
Powered by
FUDForum. Page generated in 0.02830 seconds