public class ComparisonManagerImpl extends ComparisonManager
Constructor and Description |
---|
ComparisonManagerImpl() |
Modifier and Type | Method and Description |
---|---|
static java.util.BitSet |
collectIgnoredRanges(java.util.List<? extends TextRange> ignoredRanges) |
java.util.List<DiffFragment> |
compareChars(java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare two texts by-char
|
java.util.List<MergeLineFragment> |
compareLines(java.lang.CharSequence text1,
java.lang.CharSequence text2,
java.lang.CharSequence text3,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare three texts by-line (LEFT - BASE - RIGHT)
|
java.util.List<LineFragment> |
compareLines(java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare two texts by-line
|
java.util.List<LineFragment> |
compareLines(java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
ComparisonPolicy policy,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLines(Range range,
java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
ComparisonPolicy policy,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLinesInner(java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare two texts by-line and then compare changed fragments by-word
|
java.util.List<LineFragment> |
compareLinesInner(java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
ComparisonPolicy policy,
InnerFragmentsPolicy fragmentsPolicy,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLinesInner(java.lang.CharSequence text1,
java.lang.CharSequence text2,
java.util.List<LineFragment> lineFragments,
ComparisonPolicy policy,
ProgressIndicator indicator)
Deprecated.
|
java.util.List<LineFragment> |
compareLinesInner(Range range,
java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
ComparisonPolicy policy,
boolean innerFragments,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLinesInner(Range range,
java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
ComparisonPolicy policy,
InnerFragmentsPolicy fragmentsPolicy,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLinesWithIgnoredRanges(java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
java.util.BitSet ignored1,
java.util.BitSet ignored2,
InnerFragmentsPolicy fragmentsPolicy,
ProgressIndicator indicator) |
java.util.List<LineFragment> |
compareLinesWithIgnoredRanges(Range range,
java.lang.CharSequence text1,
java.lang.CharSequence text2,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
java.util.BitSet ignored1,
java.util.BitSet ignored2,
InnerFragmentsPolicy fragmentsPolicy,
ProgressIndicator indicator)
Compare two texts by-line and then compare changed fragments by-word
|
java.util.List<DiffFragment> |
compareWords(java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare two texts by-word
|
static java.util.List<DiffFragment> |
convertIntoDiffFragments(DiffIterable changes) |
static java.util.List<LineFragment> |
convertIntoLineFragments(Range range,
LineOffsets lineOffsets1,
LineOffsets lineOffsets2,
DiffIterable changes) |
static java.util.List<MergeLineFragment> |
convertIntoMergeLineFragments(java.util.List<? extends MergeRange> conflicts) |
static java.util.List<MergeWordFragment> |
convertIntoMergeWordFragments(java.util.List<? extends MergeRange> conflicts) |
static ComparisonManagerImpl |
getInstanceImpl() |
boolean |
isEquals(java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy)
Check if two texts are equal using ComparisonPolicy
|
java.util.List<MergeLineFragment> |
mergeLines(java.lang.CharSequence text1,
java.lang.CharSequence text2,
java.lang.CharSequence text3,
ComparisonPolicy policy,
ProgressIndicator indicator)
Compare three texts by-line (LEFT - BASE - RIGHT)
Do not actually skip "ignored" changes, but keep them from forming merge conflicts.
|
java.util.List<LineFragment> |
processBlocks(java.util.List<LineFragment> oldFragments,
java.lang.CharSequence text1,
java.lang.CharSequence text2,
ComparisonPolicy policy,
boolean squash,
boolean trim) |
java.util.List<LineFragment> |
squash(java.util.List<LineFragment> oldFragments)
compareLinesInner() comparison can produce adjustment line chunks.
|
getInstance
public static ComparisonManagerImpl getInstanceImpl()
public java.util.List<LineFragment> compareLines(java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
compareLines
in class ComparisonManager
DiffTooBigException
public java.util.List<LineFragment> compareLines(java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public java.util.List<LineFragment> compareLines(Range range, java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public java.util.List<MergeLineFragment> compareLines(java.lang.CharSequence text1, java.lang.CharSequence text2, java.lang.CharSequence text3, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
compareLines
in class ComparisonManager
DiffTooBigException
public java.util.List<MergeLineFragment> mergeLines(java.lang.CharSequence text1, java.lang.CharSequence text2, java.lang.CharSequence text3, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
mergeLines
in class ComparisonManager
DiffTooBigException
public java.util.List<LineFragment> compareLinesInner(java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
compareLinesInner
in class ComparisonManager
DiffTooBigException
public java.util.List<LineFragment> compareLinesInner(java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, ComparisonPolicy policy, InnerFragmentsPolicy fragmentsPolicy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public java.util.List<LineFragment> compareLinesInner(Range range, java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, ComparisonPolicy policy, boolean innerFragments, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public java.util.List<LineFragment> compareLinesInner(Range range, java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, ComparisonPolicy policy, InnerFragmentsPolicy fragmentsPolicy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
@Deprecated public java.util.List<LineFragment> compareLinesInner(java.lang.CharSequence text1, java.lang.CharSequence text2, java.util.List<LineFragment> lineFragments, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
compareLinesInner
in class ComparisonManager
DiffTooBigException
public java.util.List<DiffFragment> compareWords(java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
compareWords
in class ComparisonManager
DiffTooBigException
public java.util.List<DiffFragment> compareChars(java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy, ProgressIndicator indicator) throws DiffTooBigException
ComparisonManager
compareChars
in class ComparisonManager
DiffTooBigException
public boolean isEquals(java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy)
ComparisonManager
isEquals
in class ComparisonManager
public static java.util.List<DiffFragment> convertIntoDiffFragments(DiffIterable changes)
public static java.util.List<LineFragment> convertIntoLineFragments(Range range, LineOffsets lineOffsets1, LineOffsets lineOffsets2, DiffIterable changes)
public static java.util.List<MergeLineFragment> convertIntoMergeLineFragments(java.util.List<? extends MergeRange> conflicts)
public static java.util.List<MergeWordFragment> convertIntoMergeWordFragments(java.util.List<? extends MergeRange> conflicts)
public java.util.List<LineFragment> squash(java.util.List<LineFragment> oldFragments)
ComparisonManager
squash
in class ComparisonManager
public java.util.List<LineFragment> processBlocks(java.util.List<LineFragment> oldFragments, java.lang.CharSequence text1, java.lang.CharSequence text2, ComparisonPolicy policy, boolean squash, boolean trim)
processBlocks
in class ComparisonManager
trim
- - if leading/trailing LineFragments with equal contents should be skippedComparisonManager.squash(java.util.List<com.intellij.diff.fragments.LineFragment>)
public java.util.List<LineFragment> compareLinesWithIgnoredRanges(java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, java.util.BitSet ignored1, java.util.BitSet ignored2, InnerFragmentsPolicy fragmentsPolicy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public java.util.List<LineFragment> compareLinesWithIgnoredRanges(Range range, java.lang.CharSequence text1, java.lang.CharSequence text2, LineOffsets lineOffsets1, LineOffsets lineOffsets2, java.util.BitSet ignored1, java.util.BitSet ignored2, InnerFragmentsPolicy fragmentsPolicy, ProgressIndicator indicator) throws DiffTooBigException
DiffTooBigException
public static java.util.BitSet collectIgnoredRanges(java.util.List<? extends TextRange> ignoredRanges)