|Implementing IEObjectMatcher [message #1819268]
||Fri, 10 January 2020 22:15
| Steve Hickman
Registered: January 2017
EMF Compare lets me create multiple Matchers and daisy chain them together so that if one Matcher fails to determine an ID for an EObject, the next one in the chain will be called.|
What if there multiple ways to Match something, with some providing a better match than others, how do I make sure the correct Match is made?
Creating customized MatchEngines, each with a different Matcher, only helps if the IComparisonScope changes. In my case, the same two objects could match based on:
2) Partial IQualifiedName
3) A common reference
4) A common second order reference
5) Type (possibly)
First, I want to match everything I can on a full IQualifiedName. For any unmatched EObjects, I want to match on a partial IQualifiedName wherever possible. For any remaining unmatched EObjects, I want to match if they share a common reference. And so on.
It looks like I need a custom implementation of IEObjectMatcher.
My questions are:
1) Is this what I need to do? If not, what should I be looking at?
2) Does there already exist some generic implementation of IEObjectMatcher that can daisy chain standard IEObjectMatcher implementations dynamically?
3) Is there any documentation other than the code that I should be looking at?
[Updated on: Fri, 10 January 2020 22:16]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01495 seconds