[ATL] Use Java method in ATL [message #631093] |
Wed, 06 October 2010 07:50 |
|
Hello,
I'm a begginer in ATL, and I want to know if there exists any way to execute Java code in order to do some things to the generated Object.
I want to do that, because I have already implemented a complex initialization in Java of that kind of objects, and I don't want to duplicate this initialization...
If it's possible, please let me know how to do it
Thanks!
Marc Gil
|
|
|
|
Re: [ATL] Use Java method in ATL [message #631097 is a reply to message #631094] |
Wed, 06 October 2010 08:03 |
|
Thanks Sylvain,
But this is an operation of the Metamodel. It's possible to execute a method placed into a static Class? Indicating the whole Namespace, name of the Class and name of the Method?
And other question: if finally I choose to call a Metamodel Operation, have I access to the atributes values that I have initialized in ATL before calling this operation?
Thanks a lot!
Marc
|
|
|
|
Re: [ATL] Use Java method in ATL [message #631113 is a reply to message #631107] |
Wed, 06 October 2010 08:59 |
|
I don't really know how to do what you're saying... You mean to modify the XXXAdapterFactory generated in the model code? In order to do what? Or how can I code my own EMFModelAdapter and tell ATL that uses it?
|
|
|
|
Re: [ATL] Use Java method in ATL [message #631147 is a reply to message #631127] |
Wed, 06 October 2010 11:00 |
|
Thanks a lot Sylvain!!
Finally I used the operations in the Metamodel. I found this solution better than the other one.
Nevertheless, the other solution is great for other things in the future...
One last question: in this way, I plan use this second solution (modify the EMFModelAdapter) in order to, for example, update a progress monitor, to show user that "something" is being done, cause we have some transformations that can take a lot of minutes. There exists any other way to 'update a progress monitor' in ATL code? Or this one is good?
|
|
|
|
Re: [ATL] Use Java method in ATL [message #634027 is a reply to message #634026] |
Wed, 20 October 2010 10:24 |
|
Hi markberg,
At this moment, in fact I'm modifying my Metamodel in order to include operations to do what I want. This solution is useful for me, because the Metamodel is mine, but if not (like uml, for instance) I must to use my own EMFModelAdapter.
Thanks
Marc
|
|
|
|
Powered by
FUDForum. Page generated in 0.04870 seconds