[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.emft] Re: [EMF Compare] Similarity in ordered list

Ok, looking closer to the code, I understood I had to write my own MatchEngine (extending from GenericMatchEngine) and override the GenericMatchEngine#isSimilar(EObject obj1, EObject obj2) function.

Guillaume Chatelet wrote:

Hello Laurent,

I'd like to compare two objects, say o1 and o2. Those objects contain an EList<IMyObject>.

The compare is pretty difficult because the lists might be shuffled and the object might change a lot.

In order for the diff ordering to be efficient I need rules to ensure that two IMyObject are similar. Otherwise the diff algorithm will conclude with a lot of additions and deletions in the list. So I need to precise what makes two IMyObject similar or not. I already played with ReferencesCheck#shouldBeIgnored(EReference) and AttributesCheck#shouldBeIgnored(EAttribute) as you proposed but it's not enough. I need to compute intermediate metrics and maybe to give some attributes more importance than others.

Do you think this is something that fits in EMF Compare's framework ? How can I do this ?

Best regards,
Guillaume