Custom Comparison [message #1810793] |
Mon, 19 August 2019 14:33  |
Eclipse User |
|
|
|
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 03:25  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03335 seconds