Skip to main content



      Home
Home » Modeling » Compare » Consider cross references for comparison(I would like to compare the cross references along with the direct referenced objects)
Consider cross references for comparison [message #1700955] Wed, 08 July 2015 08:06 Go to next message
Eclipse UserFriend
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 #1701235 is a reply to message #1700955] Fri, 10 July 2015 03:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi Sindhu,

I'm sorry, but I do not understand what you are trying to do here. Could you give us an example of what you are using as input and what you expect as a result?

Laurent Goubet
Obeo
Re: Consider cross references for comparison [message #1701269 is a reply to message #1701235] Fri, 10 July 2015 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Hello,
I am trying to compare 2 tree structure by passing the Root elements of each to EMF Compare. This tree is created by using EMF framework so all the objects are EObjects.
In that tree there are elements which are cross references. These cross references are not considered for comparison since I am using EMFCompare.createDefaultScope(EObject rootOfTree1, EObject rootOfTree2).

So I want to EMF Compare to consider cross references for comparison. One way I got to know is to define in Comparison Scope.

But how do we define in Comparison Scope to consider even the cross references for comparison?
Re: Consider cross references for comparison [message #1701275 is a reply to message #1701269] Fri, 10 July 2015 08:20 Go to previous message
Eclipse UserFriend
"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
Previous Topic:Problems with the Diff-Feature
Next Topic:MatchService.doMatch ConcurrentModificationException
Goto Forum:
  


Current Time: Sat Aug 30 21:07:07 EDT 2025

Powered by FUDForum. Page generated in 0.04092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top