Edapt doesn't do specialize reference type while ecore migration changes [message #1802396] |
Fri, 08 February 2019 01:00  |
Eclipse User |
|
|
|
I am new to custom edapt migration operation and trying to adapt the edapt migration for below ecore model changes.
I have attribute in one of the Eclass which has the reference to eclass "mapElementClass". Now, my ecore change is that, I made mapElementClass as abstract and created two more sub-class named "mapElementSubClass1" and "mapElementSubClass2" respectively.
I am trying to migrate this model changes with custom migration, and I am performing instance.migrate("ecoreName.mapElementSubClass1"); . After migration performing, in my file, nothing got changed , when I load the file, attribute is vanishing since it still points to abstract class. Hence, I add to manually make below manual changes on that reference element to make it work properly.
xsi:type="com.xxx.yyy.zzz.mapElementSubClass1"
How to make this migration correct? Even, I tried to create 'specialize reference type ' via edapt operation and still it is not working.
MetaModel changes:
<eClassifiers xsi:type="ecore:EClass" name="MappingObjectClass" eSuperTypes="#//SomeClass">
....
<eStructuralFeatures xsi:type="ecore:EReference" name="attrElement" lowerBound="1"
eType="#//mapElementClass"/>
</eClassifiers>
== Added two sub-type class. This is the model changes ==
<eClassifiers xsi:type="ecore:EClass" name="mapElementSubClass1" eSuperTypes="#//mapElementClass">
.... <some attribute definition>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="mapElementSubClass2" eSuperTypes="#//mapElementClass">
.... <some attribute definition>
</eClassifiers>
I might be doing something wrong here. I get struck at this point and any help would be appreciated.
|
|
|
|
|
|
|
Re: Edapt doesn't do specialize reference type while ecore migration changes [message #1803349 is a reply to message #1802868] |
Wed, 27 February 2019 04:20  |
Eclipse User |
|
|
|
Thanks Johannes.
Custom migration worked when I have content present in same file. But, It didn't get succeed when I have content spread out in different files and having proxy to the reference container. I am not sure what I am missing.
Since, I am pointing to same sub-class , Edapt operation worked like champ irrespective of content in same/different file. Thanks for your help.
[Updated on: Wed, 27 February 2019 04:21] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.06702 seconds