Home
Categories
Dictionary
Download
Project Details
Changes Log
License

JDiffTextPanel



The JDiffTextPanel class allows to apply a GNU diff to two text content and dhow the diff result from the two texts side by side. It uses the Diff engine internally.

Algorithms

There are three modes for showing the differences between two text content:
  • The default mode shows added, deleted, or updated lines
  • The TYPE_WITHIN_LINES_BASIC mode shows added, deleted, or updated lines. The updated lines shows the differences within the lines using a basic character by character comparison
  • The TYPE_WITHIN_LINES_DIFF mode shows added, deleted, or updated lines. The updated lines shows the differences within the lines using a diff algorithm within the line

Default algorithm

The default DiffAlgorithm.TYPE_FULL_LINES mode shows added, deleted, or updated lines.

compareresult

Simple diff mode

The DiffAlgorithm.TYPE_WITHIN_LINES_BASIC mode shows added, deleted, or updated lines. The updated lines shows the differences within the lines using a basic character by character comparison.

compareresult2

Full diff mode

The DiffAlgorithm.TYPE_WITHIN_LINES_DIFF mode shows added, deleted, or updated lines. The updated lines shows the differences within the lines using a diff algorithm within the line.

compareresult3

Categories: diff

Copyright 2016-2019 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence