Package org.eclipse.emf.compare.internal.dmp

# Class LineBasedDiff

java.lang.Object
org.eclipse.emf.compare.internal.dmp.diff_match_patch
org.eclipse.emf.compare.internal.dmp.LineBasedDiff

public class LineBasedDiff extends diff_match_patch
Extends `diff_match_patch` with a line-based diffing capability.

This extension is adopted from the descriptions and comments at https://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.compare.internal.dmp.diff_match_patch

`diff_match_patch.Diff, diff_match_patch.LinesToCharsResult, diff_match_patch.Operation, diff_match_patch.Patch`

## Field Summary

### Fields inherited from class org.eclipse.emf.compare.internal.dmp.diff_match_patch

`Diff_EditCost, Diff_Timeout, Match_Distance, Match_Threshold, Patch_DeleteThreshold, Patch_Margin`

## Constructor Summary

Constructors
Constructor
Description
`LineBasedDiff()`

## Method Summary

Modifier and Type
Method
Description
`LinkedList<diff_match_patch.Diff>`
`computeLineBasedDiff(String text1, String text2)`
Computes differences between `text1` and `text2` based on lines only (as opposed to character or word-based diffing).

### Methods inherited from class org.eclipse.emf.compare.internal.dmp.diff_match_patch

`diff_bisect, diff_charsToLines, diff_cleanupEfficiency, diff_cleanupMerge, diff_cleanupSemantic, diff_cleanupSemanticLossless, diff_commonOverlap, diff_commonPrefix, diff_commonSuffix, diff_fromDelta, diff_halfMatch, diff_levenshtein, diff_linesToChars, diff_main, diff_main, diff_prettyHtml, diff_text1, diff_text2, diff_toDelta, diff_xIndex, match_alphabet, match_bitap, match_main, patch_addContext, patch_addPadding, patch_apply, patch_deepCopy, patch_fromText, patch_make, patch_make, patch_make, patch_make, patch_splitMax, patch_toText`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LineBasedDiff

public LineBasedDiff()

## Method Details

### computeLineBasedDiff

public LinkedList<diff_match_patch.Diff> computeLineBasedDiff(String text1, String text2)
Computes differences between `text1` and `text2` based on lines only (as opposed to character or word-based diffing).

Parameters:
  `text1` - Version 1 of a text.
  `text2` - Version 2 of a text.
Returns:
  The list of differences.