Consider cross references for comparison [message #1700955] |
Wed, 08 July 2015 08:06  |
Eclipse User |
|
|
|
Hi All,
I am using EMFCompare.createDefaultScope(EObject, EObject) for comparing a tree structure. That tree structure contains cross references as the least child node. These cross references are not considered within the scope of matching phase so all the cross references will be considered as differences.
How to consider cross references for comparison and make them behave in the same way as other EObjects?
|
|
|
|
|
Re: Consider cross references for comparison [message #1701275 is a reply to message #1701269] |
Fri, 10 July 2015 08:20  |
Eclipse User |
|
|
|
"cross references" don't help define what you are trying to do; but I guess your "two trees" are actually more than two, referencing other trees elsewhere.
"EMFCompare.createDefaultScope" is deprecated. you should simply be instantiating the DefaultComparisonScope. It takes not only "EObject" instances, but accepts "Notifiers". This means you can and should be using "Resource"s as in your case, or better yet, "ResourceSet"s.
What you need to do is properly load your resources in separate resourceSets (one for right, one for left, one for the common ancestor if there is one) and use that as the comparison scope.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.05122 seconds