A compare operation must be implemented as a subclass of CompareEditorInput. A CompareEditorInput runs a (potentially lengthy) compare operation under progress monitor control, creates a UI for drilling-down into the compare results, tracks the dirty state of the result in case of merge, and saves any changes that occured during a merge.
An instance of CompareConfiguration configures various UI aspects of compare/merge viewers like title labels and images, or whether a side of a merge viewer is editable. It is passed to the CompareEditorInput on creation.
When implementing a compare operation clients have to provide a tree of IStructureComparator (see package org.eclipse.compare.structuremergeviewer) and IStreamContentAccessor that can be passed as the input to the differencing engine (org.eclipse.compare.structuremergeviewer.Differencer). A ResourceNode is a convenience class that implements both interfaces for Eclipse workbench resources (org.eclipse.core.resources.IResource). It can be used without modification as the input to the differencing engine.
The EditionSelectionDialog is a simple selection dialog where
one input element can be compared against a list of historic variants (editions)
of the same input element. The dialog can be used to implement functions
like "Replace with Version" or
"Replace with Edition" on workbench resources.
In addition it is possible to specify a subsection of the input element (e.g. a method in a Java source file) by means of a path. In this case the dialog compares only the subsection (as specified by the path) with the corresponding subsection in the list of editions. This functionality can be used to implement "Replace with Method Edition" for the Java language.
The EditionSelectionDialog requires that the editions implement the IStreamContentAccessor and IModificationDate interfaces. The HistoryItem is a convenience class that implements these interfaces for IFileState objects.