Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Use Edapt to migrate one model to another one?
Use Edapt to migrate one model to another one? [message #1844040] Sun, 29 August 2021 13:22 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 169
Registered: July 2009
Senior Member
Hi

I am thinking about giving my generated Java EMF model "A" as an API to the customer, so he can extend my RCP application and use the model instance to process the data on his own.

To keep the API stable and keep myself the possibility to extend my "A" model with new attributes or new concepts without breaking the customers API, I want to create a model "B" to be part of the API (instead of "A"). In the beginning this would be like "A", but in future version of my application, they might have more and more differences.

Can I use Edapt to create migrators to convert my "A" (v1, v2, ...) to an instance "B"?
How would this be done?
Is it possible to create as well backward migrators (B -> A v2), in case I want to support modificaiton support by the customer?

regards
Frank
Re: Use Edapt to migrate one model to another one? [message #1844041 is a reply to message #1844040] Sun, 29 August 2021 15:02 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7551
Registered: July 2009
Senior Member
Hi Frank

It's only software. I'm sure it's possible.

In so far as your enhancements are very disciplined, you can extend your metamodels.

Perhaps the best example is http://www.eclipse.org/emf/2002/Ecore, which has had a few minor changes and one major change to accommodate generics for Java 5. If the nsURI had been changed there would have been major disruption, and, for at least a few years tools, we would have needed to cope with multiple variants in the same way that the UML2 project does. The complexities of UML2's content type support suggest that this may not be a good way to go.

https://projects.eclipse.org/projects/modeling.emft.edapt suggests that Edapt is not quite dead, but no release has been scheduled since 2020-03. Perhaps not the best of foundations for a new development.

If you can be disciplined, migration can be easy. If not I would recommend an M2M to project the legacy metamodel from the evolved metamodel.

The EMF loader has a very helpful org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature() method that can be used by a proactively coded old version to ignore unsupported features added by new versions, or by new versions to rescue and translate obsolete features written by old versions.

Regards

Ed Willink
Previous Topic:[EMF Forms] Renderer or Factory
Next Topic:Ecore for mapping metamodel
Goto Forum:
  


Current Time: Tue Dec 06 22:02:47 GMT 2022

Powered by FUDForum. Page generated in 0.02635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top