Completely ignore attribute differences [message #1747490] |
Tue, 15 November 2016 13:01  |
Eclipse User |
|
|
|
Hi, so.., next question 
I would like to compare two trees and completely ignore comparison of attributes. I'm only interested in "structural" (referential) differences. What I do is override IDiffPolicy.considerEqual(). Is there a better way?
Felix
|
|
|
|
Re: Completely ignore attribute differences [message #1747492 is a reply to message #1747490] |
Tue, 15 November 2016 13:05   |
Eclipse User |
|
|
|
Yes, there is a better way. In IDiffPolicy :
/**
* Return whether the given attribute or reference must be covered by
* the difference detection algorithm.
* Precondition: if feature_p instanceof EReference then
* !((EReference)feature_p).isContainment() && !((EReference)feature_p).isContainer()
* In other terms, this method is never called for containment or container
* references. This is because those are implicitly determined by the elements
* that are present in the compared model scopes.
* @param feature_p a non-null reference or attribute
*/
boolean coverFeature(EStructuralFeature feature_p);
|
|
|
|
Powered by
FUDForum. Page generated in 0.05383 seconds