| Executing an operation of a class [message #1765468] |
Fri, 09 June 2017 18:13  |
Eclipse User |
|
|
|
Hello,
I know that I can transform operations in ATL. I am wondering how I can execute an operation.
To illustrate, assume I have a class which has three attributes of "a", "b" and "c" as well as an operation which does "a=b+c".
In the ATL transformation, I have two input models (first model is the above mentioned model). Assume during the transformation I want to execute the above mentioned operation on some attributes of the second model. How Can I achieve that?
Thank you very much.
Regards,
Mahin
|
|
|
| Re: Executing an operation of a class [message #1765484 is a reply to message #1765468] |
Sat, 10 June 2017 15:04  |
Eclipse User |
|
|
|
Provided that the operation is defined as an EOperation in your metamodel, and you generated the code for your metamodel, and you implemented the EOperation within the generated Java code, and you access your metamodel by its registered namespace URI (I.e. generated metamodel code is installed as Eclipse plug-in):
You can invoke the operation as if it were a helper method in ATL:
|
|
|
Powered by
FUDForum. Page generated in 0.03224 seconds