Skip to main content



      Home
Home » Modeling » EMF Diff/Merge » How to compare two UML Model Resources ignoring XMI ids.
How to compare two UML Model Resources ignoring XMI ids. [message #1733998] Thu, 02 June 2016 15:44 Go to next message
Eclipse UserFriend
When I copy an UML Model Resource using EcoreUtil.copyAll all XMI:IDs are redefined. Then, if I use diffmerge to compare them the result is that the models are completely different. I've tryed to use the MatchCriterionKind.NAME in the ConfigurableMatchPolicy, however it haven't worked.
Re: How to compare two UML Model Resources ignoring XMI ids. [message #1734039 is a reply to message #1733998] Fri, 03 June 2016 05:29 Go to previous message
Eclipse UserFriend
You need to override method 'getUniqueName(...)' in your match policy in order to make MatchCriterionKind.NAME effective on your metamodel (in this case, UML2).
Alternatively, since org.eclipse.uml2.uml.NamedElement also has a 'getQualifiedName()' method, you may directly override method 'getMatchID(...)' and use the qualified name as a match ID for named elements.
Previous Topic:How to get the common elements between two models
Next Topic:How to use EMF Diff/Merge programmatically
Goto Forum:
  


Current Time: Wed Jul 16 08:40:35 EDT 2025

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

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

Back to the top