If your plug-in defines and manipulates its own resource types, you may have special requirements for comparing resources. Comparing resources is common when working with local history and files from a repository. The compare plug-in provides services for implementing advanced compare views:
Two extension points are provided so that you can customize the compare for your plug-in's content types:
Because the implementation of most structure compare viewers is usually based on a tree, the compare plugin provides a generic tree-based StructureDiffViewer that defines its own extension point org.eclipse.compare.structureCreators. A structure creator breaks a single input object into a hierarchical structure. The StructureDiffViewer performs the compare on the resulting structure and displays the result as a tree.
The org.eclipse.compare.contentViewers extension point is for content viewers that do not compare their inputs. A content viewer is used in places where only a single input is available and therefore no compare is necessary. A typical example for this is the "Restore from Local History" function.
All compare viewers are standard JFace viewers that expect an input object implementing the ICompareInput interface.
The compare plugin provides additional support for implementing viewers: