Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Merging UML models with different profile versions
Merging UML models with different profile versions [message #1774825] Fri, 20 October 2017 07:19 Go to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior Member
Hello!

How does EMF Compare handles the case of merging UML models with different version of applied stereotypes?

When merging models it loads them from three points:
- left ("branch")
- right("develop")
- origin ("branch base")

Suppose initially profile versions on all theree of them are different (but profiles themselves are backward-compatible)

I can migrate models on left and right poitns (since they're branch ends) but can not change model in origin points (it's in history)

EMF Compare fails on building diff against an origin, since on origin there are some missing attributes in it's profile version, and safeEGet method throws null pointer exception.

Am I missing something?

Re: Merging UML models with different profile versions [message #1775087 is a reply to message #1774825] Tue, 24 October 2017 13:06 Go to previous message
Philip Langer is currently offline Philip LangerFriend
Messages: 99
Registered: March 2015
Location: Vienna, Austria
Member

Hi Leonid,

if you include the bundle org.eclipse.emf.compare.uml2.papyrus (e.g. through feature org.eclipse.emf.compare.diagram.papyrus - "Model comparison (EMF Compare) - Papyrus support"), you will get partial support for profile migration (see bug 495259).

In particular, EMF Compare will then run through your models before the comparison and tries, for any stereotype application that where the stereotype definition can't be resolved, to find an available profile definition (EPackage) that provides the stereotype in the registry. If such a definition can be found, it'll migrate to the respective profile and stereotype applications to the found stereotype. If no definition can be found, the model is left unchanged. Profile definitions are searched based on the URI of the missing stereotypes package URI. See also org.eclipse.emf.compare.uml2.papyrus.internal.hook.ProfileMigrationHook.

Note that this only works for static UML profiles that are registered -- it doesn't work for profiles that live in the workspace.

Hope this helps!

Best wishes,

Philip


--
Philip Langer

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:Open a saved comparison model
Next Topic:Open Compare Dialog with rebase
Goto Forum:
  


Current Time: Tue Apr 16 07:11:37 GMT 2024

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

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

Back to the top