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 Plug-in Developer Guide
Previous Page Home Next Page


Eclipse Platform
Release 3.5

Package org.eclipse.compare

Provides support for performing structural and textual compare operations on arbitrary data and displaying the results.

See:
           Description

Interface Summary
ICompareContainer A compare container is used to represent any UI that can contain compare viewers.
ICompareInputLabelProvider A label provider that provides the label and image for the left, right and ancestor sides for a compare input being shown in compare/merge viewers.
ICompareNavigator A ICompareNavigator is used to navigate through the individual differences of a CompareEditorInput or another type of Compare container.
IContentChangeListener An IContentChangeListener is informed about content changes of a IContentChangeNotifier.
IContentChangeNotifier Interface common to all objects that provide a means for registering for content change notification.
IEditableContent Common interface for objects with editable contents.
IEditableContentExtension Extends the IEditableContent interface to support validate edit.
IEncodedStreamContentAccessor Extension for IStreamContentAccessor.
IModificationDate Common interface for objects with a modification date.
INavigatable Interface that allow clients to navigate through the changes shown in a compare pane.
IPropertyChangeNotifier Interface common to all objects that provide a means for registering for property change notification.
IResourceProvider  
ISharedDocumentAdapter An ISharedDocumentAdapter is used to map an ITypedElement to a shared document for the purposes of editing.
IStreamContentAccessor An IStreamContentAccessor object represents a set of bytes which can be accessed by means of a stream.
IStreamMerger Deprecated. Clients should use org.eclipse.team.core.mapping.IStorageMerger instead.
ITypedElement Interface for getting the name, image, and type for an object.
IViewerCreator A factory object for Viewer.
 

Class Summary
BufferedContent Abstract implementation for a buffered IStreamContentAccessor.
CompareConfiguration A CompareConfiguration object controls various UI aspects of compare/merge viewers like title labels and images, or whether a side of a merge viewer is editable.
CompareEditorInput A compare operation which can present its results in a special editor.
CompareNavigator Supports cross-pane navigation through the differences of a compare container.
CompareUI The class CompareUI defines the entry point to initiate a configurable compare operation on arbitrary resources.
CompareViewerPane A CompareViewerPane is a convenience class which installs a CLabel and a Toolbar in a ViewForm.
CompareViewerSwitchingPane A custom CompareViewerPane that supports dynamic viewer switching.
EditionSelectionDialog Deprecated. Use an org.eclipse.team.ui.history.IHistoryPageSource in conjunction with the org.eclipse.team.ui.history.IHistoryView or a HistoryPageCompareEditorInput.
HistoryItem A combination IFileState and ITypedElement that can be used as an input to a compare viewer or other places where an IStreamContentAccessor is needed.
NavigationAction A NavigationAction is used to navigate through the individual differences of a CompareEditorInput.
ResourceNode A ResourceNode wraps an IResources so that it can be used as input for the differencing engine (interfaces IStructureComparator and ITypedElement) and the ReplaceWithEditionDialog (interfaces ITypedElement and IModificationDate).
SharedDocumentAdapter An implementation of ISharedDocumentAdapter that provides default behavior for the methods of that interface.
Splitter The Splitter adds support for nesting to a SashForm.
ZipFileStructureCreator This implementation of the IStructureCreator interface makes the contents of a zip archive available as a hierarchical structure of IStructureComparators.
 

Package org.eclipse.compare Description

Provides support for performing structural and textual compare operations on arbitrary data and displaying the results.

Package Specification

The class CompareUI defines the entry point to initiate a configurable compare operation on arbitrary resources. The result of the compare is opened into a compare editor where the details can be browsed and edited in dynamically selected structure and content viewers.

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.

The NavigationAction is used to navigate (step) through the individual differences of a CompareEditorInput.

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 hierarchical compare operation as a subclass of CompareEditorInput clients have to provide a tree of objects where each node implements the interface org.eclipse.compare.structuremergeviewer.IStructureComparator. This interface is used by the hierarchical differencing engine (org.eclipse.compare.structuremergeviewer.Differencer) to walk the tree.
In addition every leaf of the tree must implement the IStreamContentAccessor or IEncodedStreamContentAccessor interfaces in order to give the differencing engine access to its stream content and to its encoding (with IEncodedStreamContentAccessor).

The abstract class BufferedContent provides a default implementation for the IStreamContentAccessor and IContentChangeNotifier interfaces. Its subclass ResourceNode adds an implementation for the IStructureComparator and ITypedElement interfaces based on Eclipse workbench resources (org.eclipse.core.resources.IResource). It can be used without modification as the input to the differencing engine.

The ZipFileStructureCreator is an implementation of the org.eclipse.compare.structuremergeviewer.IStructureCreator interface and makes the contents of a zip archive available as a hierarchical structure of IStructureComparators which can be easily compared by the differencing engine (org.eclipse.compare.structuremergeviewer.Differencer). It is a good example for how to make structured files available to the hierarchical compare functionality of the Compare plugin.

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.

The CompareViewerPane is a convenience class which provides a label and local toolbar for a compare viewer (or any other subclass of a JFace Viewer).
Its abstract subclass CompareViewerSwitchingPane supports dynamic viewer switching, that is the viewer installed in the pane is dynamically determined by the pane's input object. Both classes are useful if you want to use compare viewers outside the context of a compare editor, for example in a dialog or wizard.

A Splitter is an extension of a SashForm that supports nesting, maximizing of panes, and propagating the visibility state of panes.

The interface IStreamMerger defines a single operation for performing a three-way merge on three input streams. The merged result is written to an output stream.
Clients must implement this interface when contributing new mergers to the org.eclipse.compare.streamMergers extension point. New IStreamMergers can be created for registered types with the createStreamMerger methods of CompareUI.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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