Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMigrate Model to updated Metamodel with Java
https://www.eclipse.org/forums/index.php/mv/msg/976365/1597451/#msg_1597451
I am searching for an effective way to migrate models from one metamodel to a slightly changed new metamodel. I was thinking about a plain java approach, maybe a recursive function which just copies the objects 1:1 except for the objects which have been changed at the newer metamodel.
Does someone has some experience or ideas how to solve this problem with java without rebuilding the whole modelstructure manually in the code? (So you just have to program the object-translations which have changed and not all objects and relations)
Thank you!]]>Thomas Busch2015-02-02T09:51:08-00:00Re: Migrate Model to updated Metamodel with Java
https://www.eclipse.org/forums/index.php/mv/msg/976365/1597652/#msg_1597652
Option 1: Use a domain-specific transformation language for migration:
e.g Epsilon's Flock; you get helpful operators and defaults.
Option 2: Use the source *.ecore metamodel to drive the auto-generation
of an abstract meta-transformation in your favourite transformation
language that you can customize/override. If you're lucky the
auto-generated xxxSwitch might be close.
Regards
Ed Willink
On 02/02/2015 09:51, Thomas Busch wrote:
> Hi,
>
> I am searching for an effective way to migrate models from one
> metamodel to a slightly changed new metamodel. I was thinking about a
> plain java approach, maybe a recursive function which just copies the
> objects 1:1 except for the objects which have been changed at the
> newer metamodel.
>
> Does someone has some experience or ideas how to solve this problem
> with java without rebuilding the whole modelstructure manually in the
> code? (So you just have to program the object-translations which have
> changed and not all objects and relations)
>
> Thank you!]]>Ed Willink2015-02-02T12:58:29-00:00Re: Migrate Model to updated Metamodel with Java
https://www.eclipse.org/forums/index.php/mv/msg/976365/1598106/#msg_1598106
annotated a dynamic version of the old model to specify how to create
instances of the new model. You might look at
org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.Migrator.MigrationCopier
as an example.
On 02.02.2015 13:58, Ed Willink wrote:
> Hi
>
> Option 1: Use a domain-specific transformation language for migration:
> e.g Epsilon's Flock; you get helpful operators and defaults.
>
> Option 2: Use the source *.ecore metamodel to drive the auto-generation
> of an abstract meta-transformation in your favourite transformation
> language that you can customize/override. If you're lucky the
> auto-generated xxxSwitch might be close.
>
> Regards
>
> Ed Willink
>
>
> On 02/02/2015 09:51, Thomas Busch wrote:
>> Hi,
>>
>> I am searching for an effective way to migrate models from one
>> metamodel to a slightly changed new metamodel. I was thinking about a
>> plain java approach, maybe a recursive function which just copies the
>> objects 1:1 except for the objects which have been changed at the
>> newer metamodel.
>>
>> Does someone has some experience or ideas how to solve this problem
>> with java without rebuilding the whole modelstructure manually in the
>> code? (So you just have to program the object-translations which have
>> changed and not all objects and relations)
>>
>> Thank you!
>]]>Ed Merks2015-02-02T19:55:10-00:00Re: Migrate Model to updated Metamodel with Java
https://www.eclipse.org/forums/index.php/mv/msg/976365/1598112/#msg_1598112
On 02.02.2015 20:56, Ed Merks wrote:
> Often a specialized EcoreUtil.Copier is very effective. For Oomph we
> annotated a dynamic version of the old model to specify how to create
> instances of the new model. You might look at
> org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.Migrator.MigrationCopier
> as an example.
>
> On 02.02.2015 13:58, Ed Willink wrote:
>> Hi
>>
>> Option 1: Use a domain-specific transformation language for migration:
>> e.g Epsilon's Flock; you get helpful operators and defaults.
>>
>> Option 2: Use the source *.ecore metamodel to drive the auto-generation
>> of an abstract meta-transformation in your favourite transformation
>> language that you can customize/override. If you're lucky the
>> auto-generated xxxSwitch might be close.
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 02/02/2015 09:51, Thomas Busch wrote:
>>> Hi,
>>>
>>> I am searching for an effective way to migrate models from one
>>> metamodel to a slightly changed new metamodel. I was thinking about a
>>> plain java approach, maybe a recursive function which just copies the
>>> objects 1:1 except for the objects which have been changed at the
>>> newer metamodel.
>>>
>>> Does someone has some experience or ideas how to solve this problem
>>> with java without rebuilding the whole modelstructure manually in the
>>> code? (So you just have to program the object-translations which have
>>> changed and not all objects and relations)
>>>
>>> Thank you!
>>
>]]>Ed Merks2015-02-02T19:58:42-00:00Re: Migrate Model to updated Metamodel with Java
https://www.eclipse.org/forums/index.php/mv/msg/976365/1598994/#msg_1598994
Ed Willink, do you know an example or tutorial for your option 2, the abstract meta-transformation?
]]>Thomas Busch2015-02-03T09:53:24-00:00