Comparing Editions of a Program Element

All editions of all program elements are saved in the repository. The IDE provides a browser for comparing the edition that is in the workspace with another edition from the repository. You can also use the comparison browser to merge source code from different editions into one edition.

To compare an edition in the workspace with another edition from the repository:

  1. From any page of the Workbench window, select a project, package, class, interface, or method.
  2. From the program element's pop-up menu, select Compare > Another Edition. A list will appear, showing all the editions of that program element that reside in the repository.
  3. Select the edition with which you want to compare. A comparison results window, similar to the following example, will appear. The title bar displays the names of the two compared editions. The Differences pane lists the program elements that contain differences.
  4. Select a program element from the Differences pane. The source code for the two compared editions of that program element will appear, side by side. Differences between the two editions are highlighted in each source pane.
  5. To move quickly through the list of program elements in the Differences pane, select Next Difference or Previous Difference from the pop-up menu, or type Ctrl+N and Ctrl+P.

You can also compare two editions that are in the repository:

  1. Open the Repository Explorer window.
  2. Hold down the Ctrl key to select the two editions that you want to compare.
  3. Select Compare from the pop-up menu.

ngrelc.gif (533 bytes)
Repository
Workspace
Editions and Versioning

ngrelt.gif (466 bytes)
Comparing Two Program Elements
Merging Editions of a Class or Interface
Browsing the Workspace
Searching for a Program Element in the Repository
Searching for a Program Element in the Workspace