blob: 8a56c955c560304d75f1a877bd36230326f93292 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Understanding the comparison</title>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>Understanding the comparison</H1>
<p>If you compare two files (file1.txt and file2.txt), the following results
are shown in the compare editor. The left side shows the contents of file1.txt and the right side
shows the contents of file2.txt. The lines connecting the left and right panes
indicate the differences between the files.
</p>
<p>You can double click on the editor tab to maximize the editor.
</p>
<p><img src="../images/Image80_compare_editor2.png" alt="Compare view" border="0" >
</p>
<p>Looking at the numbered changes in the above image:
</p>
<ul>
<li>Starting with the top line (in the left pane) we can see that the difference
bar (in the area of the blue circle) indicates something is missing from the
very top of the left file. If we follow the difference band (see #1) to the
right file we can see that it contains &quot;This is line 1&quot; .</li>
<li>The next line &quot;This is line 2.&quot; is white indicating it matches
the right file.</li>
<li>Moving onto the next line (colored in gray) we can see that the left file
and right file have different contents for this line (see #2).Also, you can
observe that a part of the line is highlighted. You can turn this option off
on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.compare.internal.ComparePreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="command link">
<b>General &gt; Compare/Patch</b></a> preference page.</li>
<li>The next line (&quot;This is line 4&quot;) is once again in white, so we
can skip it, since the contents are the same in both.</li>
<li>The next line exists in the left file&nbsp; but since it is gray we follow
its difference bar to the right (see #3) and notice that the right file does
not contain the line (see red circle).</li>
</ul>
<p><em>Hint:</em> On the right-hand side of the comparison, to the right of the
scrollbar, there is a column which shows a graphical representation of all differences
between the resources. You can click on any of the segments displayed there
to quickly scroll to that difference.
</p>
<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<a href="../concepts/concepts-30.htm">Synchronizing with a CVS repository</a><br>
<a href="../concepts/concepts-29.htm">Three way comparisons</a><br>
<a href="../concepts/concepts-17a.htm">Local history</a>
</p>
<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<a href="tasks-68.htm">Comparing resources</a><br>
<a href="tasks-115.htm">Synchronizing with the repository</a><br>
<a href="tasks-68dg.htm">Merging changes in the Compare editor</a><br>
<a href="tasks-113b.htm">Resolving conflicts</a><br>
<a href="tasks-68b.htm">Setting preferences for comparing files</a><br>
<a href="tasks-101.htm">Comparing resources with repository versions</a><br>
<a href="tasks-3g.htm">Tiling editors</a>
</p>
<p><img border="0" src="../images/ngrelr.png" alt="Related references" ><br>
<a href="../reference/ref-25.htm">Compare editor</a><br>
<a href="../reference/ref-33.htm">CVS Workspace Synchronization</a><br>
<a href="../reference/ref-11.htm">Compare/Patch preferences</a>
</p>
</BODY>
</HTML>