/plugins/JDiffPlugin/tags/jdiffplugin-2_1_0/docs/index.html
# · HTML · 506 lines · 379 code · 127 blank · 0 comment · 0 complexity · ffb462e7f275f0c27f244d3222a2c01c MD5 · raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
- <html>
- <head>
- <meta name="generator" content="HTML Tidy, see www.w3.org">
- <title>JDiff Plugin</title>
- </head>
- <body>
- <h2>JDiff Plugin @@build.num@@</h2>
- <p>Authors: André Kaplan, Mark Wickens, Dale Anson</p>
- <h3>Legal Notice</h3>
- <p>Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.1 or any later version published by the Free Software
- Foundation; with no Invariant Sections, Front-Cover Texts or
- Back-Cover Texts, each as defined in the license. A copy of the
- license can be found in the file COPYING.DOC.txt included with
- jEdit.</p>
- <hr>
- <a name="presentation">
- <h3>Presentation</h3>
- <p>JDiffPlugin is a visual diff and merge utility for jEdit.</p>
- <p>It features:</p>
- <ul>
- <li>
- <p>Diff overviews (local and global)</p>
- </li>
- <li>
- <p>Synchronized scrolling</p>
- </li>
- <li>
- <p>Ignore case option</p>
- </li>
- <li>
- <p>Ignore leading and trailing whitespace option</p>
- </li>
- <li>
- <p>Ignore amount of whitespace option</p>
- </li>
- <li>
- <p>Ignore all whitespace option</p>
- </li>
- <li>
- <p>Normal diff output</p>
- </li>
- <li>
- <p>Visual merging of differences between two files</p>
- </li>
- </ul>
- <hr>
- <a name="usage">
- <h3>Usage</h3>
- <p>The simplest method is to open the Dual Diff Dialog (Plugins
- -> JDiff -> <b>Show dual diff dialog</b>) and choose the
- files to compare.</p>
- <p>But you can also:</p>
- <ol>
- <li>
- <p>Split your view in two (vertically)</p>
- </li>
- <li>
- <p>Edit the buffers you want to compare:</p>
- <ul>
- <li>
- <p>the buffer on the left is the original</p>
- </li>
- <li>
- <p>the buffer on the right is the revision</p>
- </li>
- </ul>
- </li>
- <li>
- <p>Activate JDiff: <b>Plugins</b> > <b>JDiff</b>> <b>Dual
- Diff</b></p>
- </li>
- </ol>
- <p>Or if you have JDiff docked:</p>
- <ol>
- <li>Open the dockable.</li>
- <li>Click the 'Diff' button:
- <p><img alt="" src="delta.png"></p>
- </li>
- </ol>
- <p>Figure 1 shows the result</p>
- <img alt="" src="diff_overview.jpg" format="JPG">
- <hr>
- <a name="display">
- <h3>Display</h3>
- <p>Once JDiff is activated as in Figure 1, you should see:</p>
- <ul>
- <li>
- <p>Text Highlights</p>
- </li>
- <li>
- <p>A local overview (right of the original)</p>
- </li>
- <li>
- <p>A global overview (right of the revision)</p>
- </li>
- <li>
- <p>If you have activated the Diff dockable, you'll also see the
- merge controls and the line overview.</p>
- </li>
- </ul>
- <h3>Color conventions</h3>
- <p>By default:</p>
- <ul>
- <li>
- <p>Changed lines appear in yellow</p>
- </li>
- <li>
- <p>Deleted (from the original) lines appear in red</p>
- </li>
- <li>
- <p>Inserted (to the revision) lines appear in green</p>
- </li>
- <li>
- <p>Invalid lines appear as thin dark grey lines.</p>
- <ul>
- <li>
- <p>In the original, invalid lines indicate where a block was
- inserted in the revision.</p>
- </li>
- <li>
- <p>In the revision, invalid lines indicate where a block was
- deleted in the original.</p>
- </li>
- </ul>
- </li>
- </ul>
- <h3>Local overview</h3>
- <p>The local overview shows how the visible
- changed/inserted/deleted blocks from the original and the
- revision relate to each other. Merging between files can be
- performed by clicking a right arrow in the local overview, which
- will select the corresponding text from the original and replace
- the related text in the revision. The blocks to be merged are
- indicated by vertical black bars so it is obvious which code is
- moving. Clicking a left arrow in the local overview will select
- the corresponding text block from the revision and replace the
- related text in the original. Note that the code moves are by
- block, not by line, so the entire diff will be moved.</p>
- <h3>Global overview</h3>
- <p>The global overview should help you estimate how the two
- edited buffers differ. It also displays two cursors which
- indicate the visible parts of the two buffers. Clicking within
- the global overview will move the view to the corresponding part
- of the file.</p>
- <h3>Line overview</h3>
- <p>The line overview shows character-by-character differences
- between the current cursor lines within a diff block. This makes
- it easy to see the difference of even a single character change
- between the left and right lines. This overview only shows one
- line at a time of the diff block, move the cursor within the
- block to see the individual line differences for each line.</p>
- <h3>Merge controls</h3>
- <p>The merge control has 8 buttons. From left to right in
- horizontal mode:</p>
- <ol>
- <li><img alt="" src="diff.jpg"> Start a diff.</li>
- <li><img alt="" src="unsplit.jpg"> Unsplit the view, which
- ends the diff session.</li>
- <li><img alt="" src="next_diff.jpg"> Move to next
- diff.</li>
- <li><img alt="" src="move_right.jpg"> Move current diff to
- right. This replaces the diff block on the right with the text
- from the left diff block.</li>
- <li><img alt="" src="move_left.jpg"> Move current diff to
- left. This replaces the diff block on the left with the text from
- the right diff block.</li>
- <li><img alt="" src="prev_diff.jpg"> Move to previous
- diff.</li>
- <li><img alt="" src="swap.jpg"> Swap text areas, that is,
- put the file that was on the left on the right, and put the file
- that was on the right on the left.</li>
- <li><img alt="" src="refresh.jpg"> Refresh the diff.</li>
- </ol>
- <p>The merge controls can also be displayed vertically or in a
- compact form (as shown in the image above), and with or without
- the line overview. The vertical display is convenient for the
- left or right docking areas. The horizontal layout works well in
- the top or bottom docking areas. The compact layout uses less
- vertical space in the top or bottom docking areas when the line
- overview is also displayed.</p>
- <hr>
- <a name="other_commands">
- <h3>Other commands</h3>
- <p>These commands are available on the plugin menu:</p>
- <ul>
- <li>
- <p><b>Refresh</b>: refreshes the diff display</p>
- </li>
- <li>
- <p><b>Go to previous/next difference</b></p>
- </li>
- <li>
- <p><b>Ignore case</b>: toggles the "Ignore case" option for the
- current diff</p>
- </li>
- <li>
- <p><b>Ignore leading and trailing whitespace</b>: toggles the
- "Ignore leading and trailing whitespace" option for the current
- diff</p>
- </li>
- <li>
- <p><b>Ignore amount of whitespace</b>: toggles the "Ignore amount
- of whitespace" option for the current diff</p>
- </li>
- <li>
- <p><b>Ignore all whitespace</b>: toggles the "Ignore all
- whitespace" option for the current diff</p>
- </li>
- <li>
- <p><b>Normal Diff Output</b>: generates a diff file using the
- normal method</p>
- </li>
- </ul>
- <hr>
- <a name="options">
- <h3>Options</h3>
- <p>These settings can be made in the JDiff options panel, Plugins
- -> Plugin Options... -> JDiff Plugin</p>
- <h3>Line comparison options</h3>
- <p>You can configure how JDiff compares lines by default. JDiff
- can:</p>
- <ul>
- <li>
- <p>Ignore case: upper-cased lines are compared.</p>
- </li>
- <li>
- <p>Ignore leading and trailing whitespace: lines are compared as
- if leading and trailing whitespaces were removed.</p>
- </li>
- <li>
- <p>Ignore amount of whitespace: lines are compared as if any</p>
- <ul>
- <li>
- <p>leading and trailing whitespaces were removed</p>
- </li>
- <li>
- <p>sequence of whitespaces were replaced by one single space.</p>
- </li>
- </ul>
- </li>
- <li>
- <p>Ignore all whitespace: lines are compared as if:</p>
- <ul>
- <li>
- <p>any leading, trailing and inner whitespaces were removed</p>
- </li>
- </ul>
- </li>
- </ul>
- <h3>Control layout</h3>
- <p>Automatically display dockable on diff: When starting a new
- diff from the plugin menu, if on, this setting will cause the
- diff dockable to be displayed immediately so the merge controls
- are quickly accessible.</p>
- <p>Show line diffs in dockable: Toggles display of the line diff
- in the dockable. Turning this off will reduce the amount of
- screen space the dockable occupies.</p>
- <p>Merge control layout</p>
- <ul>
- <li>Horizontal: default, merge control buttons in a single
- horizontal line. Best used docked at top or bottom.</li>
- <li>Vertical: merge controls in a single vertical line. Best used
- docked at the left or right. Not a good choice when the line
- overview is also on.</li>
- <li>Compact: merge controls in 2 columns of 4 buttons. Occupies
- smallest amount of screen space when used with the line
- overview.</li>
- </ul>
- <h3>Overview colors</h3>
- <p>You can configure the colors of:</p>
- <ul>
- <li>
- <p>Changed lines</p>
- </li>
- <li>
- <p>Deleted lines</p>
- </li>
- <li>
- <p>Inserted lines</p>
- </li>
- <li>
- <p>Invalid lines</p>
- </li>
- <li>
- <p>Left cursor in the global overview</p>
- </li>
- <li>
- <p>Right cursor in the global overview</p>
- </li>
- </ul>
- <h3>Highlight colors</h3>
- <p>You can configure the colors of:</p>
- <ul>
- <li>
- <p>Changed lines</p>
- </li>
- <li>
- <p>Deleted lines</p>
- </li>
- <li>
- <p>Inserted lines</p>
- </li>
- <li>
- <p>Invalid lines</p>
- </li>
- </ul>
- <hr>
- <a name="license">
- <h3>License</h3>
- <p>The source code is distributed under the GPL. Please see <a
- href=
- "http://www.fsf.org/copyleft/gpl.html">http://www.fsf.org/copyleft/gpl.html</a></p>
- <hr>
- <a name="feedback">
- <h3>Feedback</h3>
- <p>The preferred way to send bug reports is to use the
- Sourceforge Bug Tracker at <a href=
- "http://sourceforge.net/bugs/?group_id=588">http://sourceforge.net/bugs/?group_id=588</a></p>
- <p>You can also write to:</p>
- <ul>
- <li>
- <p>jEdit-users mailing-list <a href=
- "mailto:jedit-users@lists.sourceforge.net">jedit-users@lists.sourceforge.net</a></p>
- </li>
- <li>
- <p>or jEdit-devel mailing-list <a href=
- "mailto:jedit-devel@lists.sourceforge.net">mailto:jedit-devel@lists.sourceforge.net</a></p>
- </li>
- </ul>
- <hr>
- <a name="history">
- <h3>History</h3>
- <ul>
- <li>
- <p>Version 1.8. Bug fixes, added "Diff" and "Refresh" buttons to
- merge controls, major code refactoring to clean up the various
- painting issues.</p>
- </li>
- <li>
- <p>Version 1.7. Added a dockable to display line diff and merge
- controls. Added merge functionality, added mouse listener to
- global overview. (Dale Anson)</p>
- </li>
- <li>
- <p>Version 1.5.2. Fixes to ignore whitespace options (1522563 -
- aconnor78)</p>
- </li>
- <li>
- <p>Version 1.5, updated to work with jEdit 4.3pre3+</p>
- </li>
- <li>
- <p>Version 1.4. Updated to work with jEdit v4.2+, including edits
- for new JEditTextArea handling and new plugin API.</p>
- </li>
- <li>
- <p>Version 1.3.2. Last pre-jEdit v4.2 version of plugin by
- Andr??.</p>
- </li>
- </ul>
- <hr>
- <a name="credits">
- <h3>Credits</h3>
- <ul>
- <li>
- <p>Stuart D. Gathman ported the GNU diff algorithm to Java. See
- <a href=
- "http://www.bmsi.com/java/">http://www.bmsi.com/java/</a></p>
- </li>
- <li>
- <p>Some code and ideas borrowed from JDiff by Mike Dillon
- (mdillon@jedit.org). See <a href=
- "http://sourceforge.net/projects/jdiff">http://sourceforge.net/projects/jdiff</a></p>
- </li>
- </ul>
- </body>
- </html>