Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Workbench User Guide
Previous Page Home Next Page

Understanding the comparison

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.

You can double click on the editor tab to maximize the editor.

Compare view

Looking at the numbered changes in the above image:

  • 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 "This is line 1" .
  • The next line "This is line 2." is white indicating it matches the right file.
  • 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 General > Compare/Patch preference page.
  • The next line ("This is line 4") is once again in white, so we can skip it, since the contents are the same in both.
  • The next line exists in the left file  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).

Hint: 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.

Related concepts
Synchronizing with a CVS repository
Three way comparisons
Local history

Related tasks
Comparing resources
Synchronizing with the repository
Merging changes in the Compare editor
Resolving conflicts
Setting preferences for comparing files
Comparing resources with repository versions
Tiling editors

Related references
Compare editor
CVS Workspace Synchronization
Compare/Patch preferences

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire