Skip to main content



      Home
Home » Modeling » Compare » Stop EMFCompare using URIs(How to use ProximityEObjectMatcher without URIs)
Stop EMFCompare using URIs [message #1726844] Wed, 16 March 2016 17:53 Go to next message
Eclipse UserFriend
We try to use EMFCompare (3.2.0) to compare to parts of a EMFModel that is stored in the same CDO repository. The use of URIs for matching is not useful. That is why I override the EqualityHelper to not use URIs.
However the ProximityEObjectMatcher uses its own EqualityHelper that still uses URIs to match EObjects.
This sometimes results in the following NPE:

Caused by: java.lang.NullPointerException
	at org.eclipse.emf.compare.match.eobject.URIDistance.proximity(URIDistance.java:121)
	at org.eclipse.emf.compare.match.eobject.URIDistance.proximity(URIDistance.java:95)
	at org.eclipse.emf.compare.match.eobject.EditionDistance$1$1.matchingURIs(EditionDistance.java:128)
	at org.eclipse.emf.compare.utils.EqualityHelper.matchingEObjects(EqualityHelper.java:180)
	at org.eclipse.emf.compare.utils.EqualityHelper.matchingValues(EqualityHelper.java:121)
	at org.eclipse.emf.compare.match.eobject.EditionDistance$CountingDiffEngine.haveSameContainer(EditionDistance.java:584)
	at org.eclipse.emf.compare.match.eobject.EditionDistance$CountingDiffEngine.measureDifferences(EditionDistance.java:476)
	at org.eclipse.emf.compare.match.eobject.EditionDistance.distance(EditionDistance.java:167)
	at org.eclipse.emf.compare.match.eobject.CachingDistance.distance(CachingDistance.java:57)
	at org.eclipse.emf.compare.match.eobject.internal.ProximityIndex.findTheClosest(ProximityIndex.java:182)
	at org.eclipse.emf.compare.match.eobject.internal.ProximityIndex.findTheClosest(ProximityIndex.java:196)
	at org.eclipse.emf.compare.match.eobject.internal.ProximityIndex.findClosests(ProximityIndex.java:110)
	at org.eclipse.emf.compare.match.eobject.internal.ByTypeIndex.findClosests(ByTypeIndex.java:86)
	at org.eclipse.emf.compare.match.eobject.ProximityEObjectMatcher.tryToMatch(ProximityEObjectMatcher.java:285)
	at org.eclipse.emf.compare.match.eobject.ProximityEObjectMatcher.matchList(ProximityEObjectMatcher.java:243)
	at org.eclipse.emf.compare.match.eobject.ProximityEObjectMatcher.matchIndexedObjects(ProximityEObjectMatcher.java:165)
	at org.eclipse.emf.compare.match.eobject.ProximityEObjectMatcher.createMatches(ProximityEObjectMatcher.java:127)
	at org.eclipse.emf.compare.match.eobject.IdentifierEObjectMatcher.doDelegation(IdentifierEObjectMatcher.java:187)
	at org.eclipse.emf.compare.match.eobject.IdentifierEObjectMatcher.createMatches(IdentifierEObjectMatcher.java:141)
	at org.eclipse.emf.compare.match.DefaultMatchEngine.match(DefaultMatchEngine.java:324)
	at org.eclipse.emf.compare.match.DefaultMatchEngine.match(DefaultMatchEngine.java:125)
	at org.eclipse.emf.compare.match.DefaultMatchEngine.match(DefaultMatchEngine.java:95)
	at org.eclipse.emf.compare.EMFCompare.compare(EMFCompare.java:210)
	at org.eclipse.emf.compare.EMFCompare.compare(EMFCompare.java:175)


How do I stop the ProximityEObjectMatcher to use URIs (i.o.w. how can I supply my own EqualityHelper in the ProximityEObjectMatcher too)?

Thanks for helping,

-- Carel
Re: Stop EMFCompare using URIs [message #1727006 is a reply to message #1726844] Fri, 18 March 2016 04:50 Go to previous message
Eclipse UserFriend
Hello Carel,

Unfortunately we have a known limitation on the proximity matcher which prevents users from providing their own equality helper there. See also bug 462457. The team is currently focused on other aspects so there is no immediate plan to fix this on our side. However, we'll gladly take a look at patches if you are willing to tackle the issue. The main problem comes from org.eclipse.emf.compare.match.eobject.EditionDistance.EditionDistance(Registry) creating its own equality helper and not accepting any input from the user.

Laurent Goubet
Obeo
Previous Topic:Containment reference in EMF Compare
Next Topic:[EMF Compare] Cannot find Diff and Match plugins
Goto Forum:
  


Current Time: Mon Jul 07 00:00:57 EDT 2025

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

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

Back to the top