/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

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <html>
  3. <head>
  4. <meta name="generator" content="HTML Tidy, see www.w3.org">
  5. <title>JDiff Plugin</title>
  6. </head>
  7. <body>
  8. <h2>JDiff Plugin @@build.num@@</h2>
  9. <p>Authors: André Kaplan, Mark Wickens, Dale Anson</p>
  10. <h3>Legal Notice</h3>
  11. <p>Permission is granted to copy, distribute and/or modify this
  12. document under the terms of the GNU Free Documentation License,
  13. Version 1.1 or any later version published by the Free Software
  14. Foundation; with no Invariant Sections, Front-Cover Texts or
  15. Back-Cover Texts, each as defined in the license. A copy of the
  16. license can be found in the file COPYING.DOC.txt included with
  17. jEdit.</p>
  18. <hr>
  19. <a name="presentation">
  20. <h3>Presentation</h3>
  21. <p>JDiffPlugin is a visual diff and merge utility for jEdit.</p>
  22. <p>It features:</p>
  23. <ul>
  24. <li>
  25. <p>Diff overviews (local and global)</p>
  26. </li>
  27. <li>
  28. <p>Synchronized scrolling</p>
  29. </li>
  30. <li>
  31. <p>Ignore case option</p>
  32. </li>
  33. <li>
  34. <p>Ignore leading and trailing whitespace option</p>
  35. </li>
  36. <li>
  37. <p>Ignore amount of whitespace option</p>
  38. </li>
  39. <li>
  40. <p>Ignore all whitespace option</p>
  41. </li>
  42. <li>
  43. <p>Normal diff output</p>
  44. </li>
  45. <li>
  46. <p>Visual merging of differences between two files</p>
  47. </li>
  48. </ul>
  49. <hr>
  50. <a name="usage">
  51. <h3>Usage</h3>
  52. <p>The simplest method is to open the Dual Diff Dialog (Plugins
  53. -&gt; JDiff -&gt; <b>Show dual diff dialog</b>) and choose the
  54. files to compare.</p>
  55. <p>But you can also:</p>
  56. <ol>
  57. <li>
  58. <p>Split your view in two (vertically)</p>
  59. </li>
  60. <li>
  61. <p>Edit the buffers you want to compare:</p>
  62. <ul>
  63. <li>
  64. <p>the buffer on the left is the original</p>
  65. </li>
  66. <li>
  67. <p>the buffer on the right is the revision</p>
  68. </li>
  69. </ul>
  70. </li>
  71. <li>
  72. <p>Activate JDiff: <b>Plugins</b> &gt; <b>JDiff</b>&gt; <b>Dual
  73. Diff</b></p>
  74. </li>
  75. </ol>
  76. <p>Or if you have JDiff docked:</p>
  77. <ol>
  78. <li>Open the dockable.</li>
  79. <li>Click the 'Diff' button:
  80. <p><img alt="" src="delta.png"></p>
  81. </li>
  82. </ol>
  83. <p>Figure 1 shows the result</p>
  84. <img alt="" src="diff_overview.jpg" format="JPG">
  85. <hr>
  86. <a name="display">
  87. <h3>Display</h3>
  88. <p>Once JDiff is activated as in Figure 1, you should see:</p>
  89. <ul>
  90. <li>
  91. <p>Text Highlights</p>
  92. </li>
  93. <li>
  94. <p>A local overview (right of the original)</p>
  95. </li>
  96. <li>
  97. <p>A global overview (right of the revision)</p>
  98. </li>
  99. <li>
  100. <p>If you have activated the Diff dockable, you'll also see the
  101. merge controls and the line overview.</p>
  102. </li>
  103. </ul>
  104. <h3>Color conventions</h3>
  105. <p>By default:</p>
  106. <ul>
  107. <li>
  108. <p>Changed lines appear in yellow</p>
  109. </li>
  110. <li>
  111. <p>Deleted (from the original) lines appear in red</p>
  112. </li>
  113. <li>
  114. <p>Inserted (to the revision) lines appear in green</p>
  115. </li>
  116. <li>
  117. <p>Invalid lines appear as thin dark grey lines.</p>
  118. <ul>
  119. <li>
  120. <p>In the original, invalid lines indicate where a block was
  121. inserted in the revision.</p>
  122. </li>
  123. <li>
  124. <p>In the revision, invalid lines indicate where a block was
  125. deleted in the original.</p>
  126. </li>
  127. </ul>
  128. </li>
  129. </ul>
  130. <h3>Local overview</h3>
  131. <p>The local overview shows how the visible
  132. changed/inserted/deleted blocks from the original and the
  133. revision relate to each other. Merging between files can be
  134. performed by clicking a right arrow in the local overview, which
  135. will select the corresponding text from the original and replace
  136. the related text in the revision. The blocks to be merged are
  137. indicated by vertical black bars so it is obvious which code is
  138. moving. Clicking a left arrow in the local overview will select
  139. the corresponding text block from the revision and replace the
  140. related text in the original. Note that the code moves are by
  141. block, not by line, so the entire diff will be moved.</p>
  142. <h3>Global overview</h3>
  143. <p>The global overview should help you estimate how the two
  144. edited buffers differ. It also displays two cursors which
  145. indicate the visible parts of the two buffers. Clicking within
  146. the global overview will move the view to the corresponding part
  147. of the file.</p>
  148. <h3>Line overview</h3>
  149. <p>The line overview shows character-by-character differences
  150. between the current cursor lines within a diff block. This makes
  151. it easy to see the difference of even a single character change
  152. between the left and right lines. This overview only shows one
  153. line at a time of the diff block, move the cursor within the
  154. block to see the individual line differences for each line.</p>
  155. <h3>Merge controls</h3>
  156. <p>The merge control has 8 buttons. From left to right in
  157. horizontal mode:</p>
  158. <ol>
  159. <li><img alt="" src="diff.jpg">&nbsp; Start a diff.</li>
  160. <li><img alt="" src="unsplit.jpg"> &nbsp; Unsplit the view, which
  161. ends the diff session.</li>
  162. <li><img alt="" src="next_diff.jpg">&nbsp; Move to next
  163. diff.</li>
  164. <li><img alt="" src="move_right.jpg">&nbsp; Move current diff to
  165. right. This replaces the diff block on the right with the text
  166. from the left diff block.</li>
  167. <li><img alt="" src="move_left.jpg">&nbsp; Move current diff to
  168. left. This replaces the diff block on the left with the text from
  169. the right diff block.</li>
  170. <li><img alt="" src="prev_diff.jpg">&nbsp; Move to previous
  171. diff.</li>
  172. <li><img alt="" src="swap.jpg">&nbsp; Swap text areas, that is,
  173. put the file that was on the left on the right, and put the file
  174. that was on the right on the left.</li>
  175. <li><img alt="" src="refresh.jpg">&nbsp; Refresh the diff.</li>
  176. </ol>
  177. <p>The merge controls can also be displayed vertically or in a
  178. compact form (as shown in the image above), and with or without
  179. the line overview. The vertical display is convenient for the
  180. left or right docking areas. The horizontal layout works well in
  181. the top or bottom docking areas. The compact layout uses less
  182. vertical space in the top or bottom docking areas when the line
  183. overview is also displayed.</p>
  184. <hr>
  185. <a name="other_commands">
  186. <h3>Other commands</h3>
  187. <p>These commands are available on the plugin menu:</p>
  188. <ul>
  189. <li>
  190. <p><b>Refresh</b>: refreshes the diff display</p>
  191. </li>
  192. <li>
  193. <p><b>Go to previous/next difference</b></p>
  194. </li>
  195. <li>
  196. <p><b>Ignore case</b>: toggles the "Ignore case" option for the
  197. current diff</p>
  198. </li>
  199. <li>
  200. <p><b>Ignore leading and trailing whitespace</b>: toggles the
  201. "Ignore leading and trailing whitespace" option for the current
  202. diff</p>
  203. </li>
  204. <li>
  205. <p><b>Ignore amount of whitespace</b>: toggles the "Ignore amount
  206. of whitespace" option for the current diff</p>
  207. </li>
  208. <li>
  209. <p><b>Ignore all whitespace</b>: toggles the "Ignore all
  210. whitespace" option for the current diff</p>
  211. </li>
  212. <li>
  213. <p><b>Normal Diff Output</b>: generates a diff file using the
  214. normal method</p>
  215. </li>
  216. </ul>
  217. <hr>
  218. <a name="options">
  219. <h3>Options</h3>
  220. <p>These settings can be made in the JDiff options panel, Plugins
  221. -&gt; Plugin Options... -&gt; JDiff Plugin</p>
  222. <h3>Line comparison options</h3>
  223. <p>You can configure how JDiff compares lines by default. JDiff
  224. can:</p>
  225. <ul>
  226. <li>
  227. <p>Ignore case: upper-cased lines are compared.</p>
  228. </li>
  229. <li>
  230. <p>Ignore leading and trailing whitespace: lines are compared as
  231. if leading and trailing whitespaces were removed.</p>
  232. </li>
  233. <li>
  234. <p>Ignore amount of whitespace: lines are compared as if any</p>
  235. <ul>
  236. <li>
  237. <p>leading and trailing whitespaces were removed</p>
  238. </li>
  239. <li>
  240. <p>sequence of whitespaces were replaced by one single space.</p>
  241. </li>
  242. </ul>
  243. </li>
  244. <li>
  245. <p>Ignore all whitespace: lines are compared as if:</p>
  246. <ul>
  247. <li>
  248. <p>any leading, trailing and inner whitespaces were removed</p>
  249. </li>
  250. </ul>
  251. </li>
  252. </ul>
  253. <h3>Control layout</h3>
  254. <p>Automatically display dockable on diff: When starting a new
  255. diff from the plugin menu, if on, this setting will cause the
  256. diff dockable to be displayed immediately so the merge controls
  257. are quickly accessible.</p>
  258. <p>Show line diffs in dockable: Toggles display of the line diff
  259. in the dockable. Turning this off will reduce the amount of
  260. screen space the dockable occupies.</p>
  261. <p>Merge control layout</p>
  262. <ul>
  263. <li>Horizontal: default, merge control buttons in a single
  264. horizontal line. Best used docked at top or bottom.</li>
  265. <li>Vertical: merge controls in a single vertical line. Best used
  266. docked at the left or right. Not a good choice when the line
  267. overview is also on.</li>
  268. <li>Compact: merge controls in 2 columns of 4 buttons. Occupies
  269. smallest amount of screen space when used with the line
  270. overview.</li>
  271. </ul>
  272. <h3>Overview colors</h3>
  273. <p>You can configure the colors of:</p>
  274. <ul>
  275. <li>
  276. <p>Changed lines</p>
  277. </li>
  278. <li>
  279. <p>Deleted lines</p>
  280. </li>
  281. <li>
  282. <p>Inserted lines</p>
  283. </li>
  284. <li>
  285. <p>Invalid lines</p>
  286. </li>
  287. <li>
  288. <p>Left cursor in the global overview</p>
  289. </li>
  290. <li>
  291. <p>Right cursor in the global overview</p>
  292. </li>
  293. </ul>
  294. <h3>Highlight colors</h3>
  295. <p>You can configure the colors of:</p>
  296. <ul>
  297. <li>
  298. <p>Changed lines</p>
  299. </li>
  300. <li>
  301. <p>Deleted lines</p>
  302. </li>
  303. <li>
  304. <p>Inserted lines</p>
  305. </li>
  306. <li>
  307. <p>Invalid lines</p>
  308. </li>
  309. </ul>
  310. <hr>
  311. <a name="license">
  312. <h3>License</h3>
  313. <p>The source code is distributed under the GPL. Please see <a
  314. href=
  315. "http://www.fsf.org/copyleft/gpl.html">http://www.fsf.org/copyleft/gpl.html</a></p>
  316. <hr>
  317. <a name="feedback">
  318. <h3>Feedback</h3>
  319. <p>The preferred way to send bug reports is to use the
  320. Sourceforge Bug Tracker at <a href=
  321. "http://sourceforge.net/bugs/?group_id=588">http://sourceforge.net/bugs/?group_id=588</a></p>
  322. <p>You can also write to:</p>
  323. <ul>
  324. <li>
  325. <p>jEdit-users mailing-list <a href=
  326. "mailto:jedit-users@lists.sourceforge.net">jedit-users@lists.sourceforge.net</a></p>
  327. </li>
  328. <li>
  329. <p>or jEdit-devel mailing-list <a href=
  330. "mailto:jedit-devel@lists.sourceforge.net">mailto:jedit-devel@lists.sourceforge.net</a></p>
  331. </li>
  332. </ul>
  333. <hr>
  334. <a name="history">
  335. <h3>History</h3>
  336. <ul>
  337. <li>
  338. <p>Version 1.8. Bug fixes, added "Diff" and "Refresh" buttons to
  339. merge controls, major code refactoring to clean up the various
  340. painting issues.</p>
  341. </li>
  342. <li>
  343. <p>Version 1.7. Added a dockable to display line diff and merge
  344. controls. Added merge functionality, added mouse listener to
  345. global overview. (Dale Anson)</p>
  346. </li>
  347. <li>
  348. <p>Version 1.5.2. Fixes to ignore whitespace options (1522563 -
  349. aconnor78)</p>
  350. </li>
  351. <li>
  352. <p>Version 1.5, updated to work with jEdit 4.3pre3+</p>
  353. </li>
  354. <li>
  355. <p>Version 1.4. Updated to work with jEdit v4.2+, including edits
  356. for new JEditTextArea handling and new plugin API.</p>
  357. </li>
  358. <li>
  359. <p>Version 1.3.2. Last pre-jEdit v4.2 version of plugin by
  360. Andr??.</p>
  361. </li>
  362. </ul>
  363. <hr>
  364. <a name="credits">
  365. <h3>Credits</h3>
  366. <ul>
  367. <li>
  368. <p>Stuart D. Gathman ported the GNU diff algorithm to Java. See
  369. <a href=
  370. "http://www.bmsi.com/java/">http://www.bmsi.com/java/</a></p>
  371. </li>
  372. <li>
  373. <p>Some code and ideas borrowed from JDiff by Mike Dillon
  374. (mdillon@jedit.org). See <a href=
  375. "http://sourceforge.net/projects/jdiff">http://sourceforge.net/projects/jdiff</a></p>
  376. </li>
  377. </ul>
  378. </body>
  379. </html>