|
Re: Custom Matching Strategy [message #1723825 is a reply to message #1723753] |
Thu, 18 February 2016 09:48 |
|
Hi,
There is no real example of how to create your own match engine, as that is a very big part of EMF Compare and needs quite a lot of logic. You might want to look at how to implement smaller parts of the matching process. Overriding the match engine tells you how to replace the IMatchEngine as a whole. you'll have to look at the default implementation (DefaultMatchEngine) for an example of the needed logic if you want to go that high level. Otherwise, you might want to take a look at how to replace the IEObjectMatcher (which is explained in the Defining custom identifiers section below the earlier). IEObjectMatchers are the main part of the match engine and that's what will create the "Match" objects that will tell EMF Compare what elements should be diffed with what other one. Even lower level stands the IEqualityHelper that will actually tell EMF Compare (throughout the whole process which EObject is equal to which other. This last part can be replaced by modifying the IEqualityHelperFactory that you'll pass to the comparison factory (you can see that being used in the same section as above, Defining custom identifiers).
As you might guess, overriding this part of the comparison process is far from trivial. Could you share on your use case and what issues you are trying to solve? There might be better ways to tackle this endeavor.
Laurent Goubet
Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25533 seconds