Metamodel migration, how to ? [message #535091] |
Fri, 21 May 2010 05:36  |
Eclipse User |
|
|
|
Hello,
I have a big ecore metamodel(myMetaModelv1.ecore) that I refactored by changing a few inheritance and some class attributes and references (myMetaModelv2.ecore).
I am in the process of writing a migration engine for all the models conforming to the old metamodel, so I tought of using some M2M transformation.
I looked at the ATL transformation user guide and it seems that I need to create a copy of all the old model instance into the new model.
My problem is that most of the classes have not been renamed and still have the same attributes, the changes I have made just concern a small amount of classes.
I there any mean such as a ecore transformation/generation that could help me generate the atl script for the copy of the old instance to the new ones automatically ?
Is there another approach to take ?
Thanks for any lead.
SeB.
|
|
|
|
|
|
|
|
Re: Metamodel migration, how to ? [message #535170 is a reply to message #535156] |
Fri, 21 May 2010 09:25  |
Eclipse User |
|
|
|
Thanks, I manage to generate the copy.atl file from the script.
Now I'll try to make it work.
SeB.
Sylvain EVEILLARD wrote on Fri, 21 May 2010 08:51 | seb.fr wrote on Fri, 21 May 2010 08:02 | Sylvain EVEILLARD wrote on Fri, 21 May 2010 06:40 | Have a look here (EModelCopyGenerator.atl).
|
Thank fo the tip, This seems to be what I am looking for althoug I am looking at Atlas Model Weaving also.
But I do not know how to use the given ATL, do you have any lead or tutorial on how to use the query the user guide is not sufficent.
Is there any book I could get have deeper information on ATL ?
Anyway thaks for this quick answer.
SeB.
|
A query is just a standard transformation but you only add input models. Here the input model is your metamodel conforming to ecore (be sure to use the 'isMetaMetaModel' checkbox).Be careful tho that with ATL v3, the writeTo helper is no longer relative to the workspace but to the eclipse installation folder instead (that is really puzzling I know). So, just use an absolute path.
|
|
|
|
Powered by
FUDForum. Page generated in 0.75154 seconds