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: 44
Registered: October 2012
Member
Hello,

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, (https://www.eclipse.org/emf/compare/documentation/latest/FAQ.html), but it seems it is not working anymore. I am using eclipse 2018-12.


Any kind of help will be appreciate,

Regards,


Daniel.

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: 1886
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 org.eclipse.emf.compare.rcp.weightProvider 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
Obeo
Previous Topic:EMF Compare get Object Attributes
Next Topic:Standard PostProcessor to handle Refactor Rename ?
Goto Forum:
  


Current Time: Thu Oct 22 15:37:40 GMT 2020

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

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

Back to the top