Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 28d91eedb4cb7786cd9cd2adf19270944f8b0c99 (plain) (tree)


































                                                                                                  
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="IBM">
   <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
   <title>Package-level Javadoc</title>
</head>
<body>
Support for compare and merge viewers which show the
content side-by-side.
<h2>
Package Specification</h2>
The <tt>ContentMergeViewer</tt> is an abstract compare and merge viewer
with two side-by-side content areas and an optional content area for a
common ancestor (for three-way compare). Because the implementation makes
no assumptions about the content type it is a subclass responsibility to
deal with a specific type.
<p>A <tt>ContentMergeViewer</tt> accesses its model by means of a content
provider which must implement the
<br><tt>IMergeViewerContentProvider</tt> interface.
<p>The <tt>TextMergeViewer</tt> is the standard concrete subclass of <tt>ContentMergeViewer</tt>.
A text merge viewer uses the <tt>RangeDifferencer</tt> to perform a textual,
line-by-line comparison of two (or three) input documents. For text lines
that differ the <tt>TextMergeViewer</tt> uses an <tt>ITokenComparator</tt>
to find longest sequences of matching and non-matching tokens. The <tt>TextMergeViewer</tt>'s
default token compare works on characters separated by whitespace. If a
different strategy is needed (for example, Java tokens in a Java-aware
merge viewer), clients can create their own token comparators by implementing
the <tt>ITokenComparator</tt> interface.
<p>The <tt>TextMergeViewer</tt> not only works on whole documents but on
subranges of documents too. In this case the viewer's input must be an
<tt>IDocumentRange</tt> instead of an <tt>IDocument</tt>.
</body>
</html>

Back to the top