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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Eclipse Workbench User Guide
Previous Page Home Next Page

Working with the comparison

Comparing file1.txt and file2.txt resulted in the following compare editor. This section demonstrates how to use the compare editor to resolve the differences between the two files.

Compare editor

There are two parts to the compare editor's local toolbar. Move to the next or previous change using the right group of local toolbar buttons.

Compare buttons

  1. Click the Select Next Change button Compare editor next button. Observe how it selects the next difference.

  2. Click the Select Next Change button a second time to go to the next change.

  3. Click the Select Previous Change button.

To merge changes from the left file to the right file and vice versa use the left group of local toolbar buttons. There are four types of merges that can be performed:

  • Copy whole document from left to right.
  • Copy whole document from right to left.
  • Copy current change from left to right.
  • Copy current change from right to left.

Typically the copy whole document actions are used when the entire file on either the left or right can just be replaced by the contents of the other file.

The Copy current change buttons allow a single change to be merged.

  1. Ensure that the second difference is selected (as shown below):

    Compare editor

  2. Click Copy Current Change from Right to Left Compare editor right to left button. Observe that the selected text from the right file is copied to the left file.

    Compare editor

  3. Close the compare editor and choose Yes to save the changes. Alternatively, save the changes by choosing File > Save (Ctrl+S).


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