Bug 485006 - EKeys are not considered as exact match in a IObjectMatcher
Summary: EKeys are not considered as exact match in a IObjectMatcher
Status: UNCONFIRMED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-30 03:56 EST by Rolf Theunissen CLA
Modified: 2016-01-18 05:26 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Theunissen CLA 2015-12-30 03:56:13 EST
Currently two IObjectMatcher implementations exist:

- IdentifierEObjectMacher, which looks at EObject ID's
- ProximityEObjectMatcher, which uses a distance function

Besides the global ID's (used by IdentifierEObjectMacher), and the default fragment paths (used by ProximityEObjectMatcher), as of EMF 2.3 reference keys can be used to identify objects uniquely, see Chapter 21.3.2 of the EMF book.

There should be an IObjectMatcher what uses EKeys to identify objects uniquely. 

Note that, probably the ProximityEObjectMatcher does take EKeys into account, by calling 'matchingURIs' inside the EditionDistance class.
Comment 1 Laurent Delaigue CLA 2016-01-05 09:48:56 EST
Hello Rolf,

Do you have a use-case where the fact that EMFCompare does not provide an implementation of IEObjectMatcher that uses EKeys to identify EObjects is a problem?
Because, as you mention, ProximityEObjectMatcher will use EKeys (via the URI), and fall back to heuristics of no EKey is present.
Comment 2 Rolf Theunissen CLA 2016-01-15 05:47:21 EST
Hello Laurent,

We (try to) define unique identifiers for each element in our models. These id's are either based on global ids or on tags on containment references on objects that are already uniquely identifiable. Similar matching behavior is expected for all uniquely identifiable objects.

When using the IdentifierEObject matcher, objects are only matched when the ID's are the same, there is no fallback to the ProximityEObjectMacher for objects that have an ID defined.
For uniquely identifiable objects by tags similar behavior is expected. If tags are defined, only use tags and do not fall back to Proximity. Currently when the proximity matcher is used, and tags do not match, other heuristics are used instead of marking it as not matching. Furthermore, for large models this fallback to other heuristics has huge performance impact.