While working with Eclipse, you might need to compare a file with another file to analyze the differences between the two.
This feature enables you to compare
Any two files that you have opened in an editor
Any two files from the OS 2200 File Explorer
Any two files from one or more projects under OS 2200 Explorer
Any two files that are stored on the local system or on a configured server, that are neither opened in any editor nor listed in the OS 2200 File Explorer or OS 2200 Explorer view
Any file opened in an editor with a file on the file system
Notes:
You cannot compare a file from OS 2200 File Explorer with a file from OS 2200 Explorer. To do that, you have to open both files in the editor.
If the comparison is performed from the OS 2200 Explorer, then the elements are compared from the local cache.
While configuring the comparison tool, do not open two editors or select two files.
After you configure a tool as the default one, you do not need to select a tool for comparison the next time you want to perform the compare operation, and OS 2200 IDE for Eclipse directly displays the comparison results upon selecting two files.
To compare a file with another file
Perform one of the following:
To compare files that you have opened in an editor
Click
on the tool bar.
The Compare window listing all open editors appears. OS 2200
IDE for Eclipse automatically selects the file that is currently
active in the editor as the base file.
Note: To select a different
file as the base file, click
located
near Base File to
browse to the location of the base file and select the file.
Select
the second file from the list of all open files from the Compare
window.
Note: To select a different
file as the second file, click
located
near Compare File
to browse to the desired location of the second file and select
the file.
As you scroll through the files in the Compare window, the
path of the file dynamically appears in the Compare
File text box.
If you have opened only one file, click
located near Compare File
to browse to the location of the second file and select the
file.
To compare files listed in the OS 2200 File Explorer view or the OS 2200 Explorer view
Select any two files from the list, and then right-click.
On the context-sensitive
menu, click OS 2200 Compare.
Note:
You can select files from multiple projects also.
If you have selected only one file, click
located near Compare File
to browse to the location of the second file and select the
file. If you have selected more than two files, the first
file appears in the Base
File field and the second file appears in the Compare File field. You
can scroll through the selected files displayed in the Compare
window to select a different file as the second file.
Note:
If you have previously configured a tool for comparison, OS
2200 IDE for Eclipse directly displays the comparison results
upon selecting two files.
To compare files that are stored on the local system or on a configured server that are neither opened in any editor nor listed in the OS 200 File Explorer or OS 2200 Explorer view
Click
on the tool bar.
In the Compare window, click
located near Base File to browse to the
location of the desired file and select the base file.
Once you select
the base file, click
located near Compare File to browse to
the location of the desired file and select the second file.
Click
Swap in the Compare window
if you want to interchange between the base file and the compare file.
The path of the base file and the path of the compare file appear in
the Base File and Compare
File fields, respectively.
Note: If
you have opened the files from OS
2200 File Explorer or OS 2200
Explorer, the path of the files appear in the OS 2200 format.
If you have opened the files from your local system, the path of the
files appears in the Windows format.
Select a tool for comparison from the Compare Tool list, and click OK.
The differences between the base file and the compare file appear in a new window.
To configure compare tools, refer to Configuring Compare Tools.