public class TextNodeComparator extends Object implements IRangeComparator, Iterable<TextNode>
| Constructor and Description |
|---|
TextNodeComparator(DomTree tree,
Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
void |
expandWhiteSpace() |
BodyNode |
getBodyNode() |
long |
getChangedID() |
long |
getDeletedID() |
List<Modification> |
getLastModified() |
long |
getNewID() |
int |
getRangeCount()
Returns the number of comparable entities.
|
TextNode |
getTextNode(int i) |
void |
handlePossibleChangedPart(int leftstart,
int leftend,
int rightstart,
int rightend,
TextNodeComparator leftComparator,
org.eclipse.core.runtime.IProgressMonitor progressMonitor) |
Iterator<TextNode> |
iterator() |
void |
markAsDeleted(int start,
int end,
TextNodeComparator oldComp,
int before,
int after)
Marks the given range as deleted.
|
void |
markAsDeleted(int start,
int end,
TextNodeComparator oldComp,
int before,
int after,
ModificationType outputFormat)
Marks the given range as deleted.
|
void |
markAsNew(int start,
int end)
Marks the given range as new.
|
void |
markAsNew(int start,
int end,
ModificationType outputFormat)
Marks the given range as new.
|
boolean |
rangesEqual(int i1,
IRangeComparator rangeComp,
int i2)
Returns whether the comparable entity given by the first index matches an
entity specified by the other
IRangeComparator and index. |
void |
setLastModified(List<Modification> aLastModified) |
void |
setStartChangedID(long aChangedID)
Used for combining multiple comparators in order to create a single
output document.
|
void |
setStartDeletedID(long aDeletedID)
Used for combining multiple comparators in order to create a single
output document.
|
void |
setStartNewID(long aNewID)
Used for combining multiple comparators in order to create a single
output document.
|
boolean |
skipRangeComparison(int arg0,
int arg1,
IRangeComparator arg2)
Returns whether a comparison should be skipped because it would be too
costly (or lengthy).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic BodyNode getBodyNode()
public int getRangeCount()
IRangeComparatorgetRangeCount in interface IRangeComparatorpublic TextNode getTextNode(int i)
public void markAsNew(int start,
int end,
ModificationType outputFormat)
start - end - outputFormat - specifies how this range shall be formatted in the outputpublic void markAsNew(int start,
int end)
start - end - public boolean rangesEqual(int i1,
IRangeComparator rangeComp,
int i2)
IRangeComparatorIRangeComparator and index.rangesEqual in interface IRangeComparatori1 - the index of the comparable entity within this
IRangeComparatorrangeComp - the IRangeComparator to compare this withi2 - the index of the comparable entity within the other
IRangeComparatortrue if the comparable entities are equalpublic boolean skipRangeComparison(int arg0,
int arg1,
IRangeComparator arg2)
IRangeComparatorskipRangeComparison in interface IRangeComparatorarg0 - a number on which to base the decision whether to return
true or falsearg1 - another number on which to base the decision whether to
return true or falsearg2 - the other IRangeComparator to compare withtrue to avoid a too lengthy range comparisonpublic void handlePossibleChangedPart(int leftstart,
int leftend,
int rightstart,
int rightend,
TextNodeComparator leftComparator,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
public void markAsDeleted(int start,
int end,
TextNodeComparator oldComp,
int before,
int after,
ModificationType outputFormat)
start - end - oldComp - before - outputFormat - specifies how this range shall be formatted in the outputpublic void markAsDeleted(int start,
int end,
TextNodeComparator oldComp,
int before,
int after)
start - end - oldComp - before - public void expandWhiteSpace()
public void setStartDeletedID(long aDeletedID)
aDeletedID - public void setStartChangedID(long aChangedID)
aChangedID - public void setStartNewID(long aNewID)
aNewID - public long getChangedID()
public long getDeletedID()
public long getNewID()
public List<Modification> getLastModified()
public void setLastModified(List<Modification> aLastModified)
Copyright © 2022. All rights reserved.