Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Custom Comparison(Code to Create Custom Comparison)
Custom Comparison [message #1810793] Mon, 19 August 2019 18:33 Go to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 45
Registered: October 2012

I want to compare two uml models with just package objects. I need to compare them by the names of the packages, so I think I must create a custom comparision.

I tried with the implementation of IEqualityHelperFactory, (, but it seems it is not working anymore. I am using eclipse 2018-12.

Any kind of help will be appreciate,



Re: Custom Comparison [message #1811055 is a reply to message #1810793] Mon, 26 August 2019 07:25 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1898
Registered: July 2009
Senior Member
Hello Daniel,

By default, UML models use xmi ID, so the matching will be done using these identifiers. If you wish to ignore the identifiers, you need to tell it to EMF Compare, see the Ignoring Identifiers section of the developper guide.
This will only influence the matching process and will ensure that your packages will not be matched through identifier but through similarity instead. You will likely have to customize parts of the similarity process as well if you want only the packages' names to have any weight for the matching. See the extension point for this. Going further will need to override the IEqualityHelper as well since that is what will be used later on in the differencing process (if the default differences don't do it for you).

Laurent Goubet
Previous Topic:EMF Compare get Object Attributes
Next Topic:Standard PostProcessor to handle Refactor Rename ?
Goto Forum:

Current Time: Mon Jul 04 10:13:22 GMT 2022

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

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

Back to the top