|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITokenComparator
For performing a so-called "token compare" on a line of text.
This interface extends the IRangeComparator interface
so that it can be used by the TextMergeViewer.
TextMergeViewer activates the token compare when navigating into
a range of differing lines. At first the lines are selected as a block.
When navigating into this block the token compare shows for every line
the differing token by selecting them.
TextMergeViewer's default token comparator works on characters separated
by whitespace. If a different strategy is needed (for example, to use Java tokens in
a Java-aware merge viewer), clients may create their own token
comparators by implementing this interface (and overriding the
TextMergeViewer.createTokenComparator factory method).
TextMergeViewer| Method Summary | |
|---|---|
int |
getTokenLength(int index)
Returns the character length of the token with the given index. |
int |
getTokenStart(int index)
Returns the start character position of the token with the given index. |
| Methods inherited from interface org.eclipse.compare.rangedifferencer.IRangeComparator |
|---|
getRangeCount, rangesEqual, skipRangeComparison |
| Method Detail |
|---|
int getTokenStart(int index)
index - index of the token for which to return the start position
IndexOutOfBoundsException - if index is negativeint getTokenLength(int index)
index - index of the token for which to return the start position
IndexOutOfBoundsException - if index is negative
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.