Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:44 Go to next message
Wesley Klewerton is currently offline Wesley KlewertonFriend
Messages: 11
Registered: March 2016
Junior Member
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 09:29 Go to previous message
Olivier Constant is currently offline Olivier ConstantFriend
Messages: 92
Registered: January 2012
Member
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: Sun Aug 19 19:08:13 GMT 2018

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

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

Back to the top