|Naming Concept Left/Right [message #902996]
||Tue, 21 August 2012 10:49
| Benjamin Klatt
Registered: September 2010
I am trying to find a clear definition when to use the term / reference "left" respectively "right" is used for attributes, references etc.
When I am triggering the MatchEngine in my code MatchEngine.doMatch(leftRoot, rightRoot), I expected the left model to be the leading one and to find out later on, how the right model differs from the left one.
On the other hand, when working with a resulting DiffGroup element, it only provides the rightParent.
So is this just a wrong expectation of mine, that the left model is the leading one, the right one is compared to?
And is there any point in the documentation or in the Model/JavaDoc specifying left and right in the context of EMFCompare?
Btw.: The JavaDoc of the DiffGroup.getRightParent() contains "If the meaning of the 'Right Parent' reference isn't clear, there really should be more of a description here... "
Thanks a lot
|Re: Naming Concept Left/Right [message #903329 is a reply to message #902996]
||Thu, 23 August 2012 03:59
| Laurent Goubet
Registered: July 2009
As I mentionned in an answer to your other question, we are currently focusing on the 2.0 version of EMF Compare. One of the main reasons for that move is to simplify the core of our tool... and make it more easily understandable by clients.
You have to remember that EMF Compare is a comparison tool integrated with the Eclipse team API. When you compare two files in Eclipse, you will notice that the "right" file is in fact the "original" one, and the "left" is the new. This same direction has been used in EMF Compare 1 and is kept with EMF Compare 2. In other words :
- when you compare two files, "left" is the new one and "right" is the reference
- when you compare three files, "left" is the new one, "right" is the reference, and "ancestor" is the common ancestor of the two, allowing us to determine conflicts
This second option is what is used when you compare files in a VCS : right-click a file that's versionned with CVS, SVN or Git, then select "compare with > latest from HEAD". What's really done under the hood is that we compare the "local" version of the file with its "remote" version which is the latest version of that file on the VCS... but with all information that comes from the common ancestor of "local" and "remote" if "remote" changed since that origin. Here, "local" is "left" and "remote" is "right".
As for the Javadoc of DiffGroup.getRightParent ... That's something automatically generated by EMF (it does not generate the proper documentation on interfaces). You should find a more useful one in DiffGroupImpl.getRightParent IIRC.
Note, once again, that the 2.0 version should be a little clearer on these.
Powered by FUDForum
. Page generated in 0.02624 seconds