public class DefaultLineTracker extends AbstractLineTracker
ILineTracker
.
The line tracker considers the three common line delimiters which are '\n', '\r', '\r\n'.
This class is not intended to be subclassed.
AbstractLineTracker.DelimiterInfo, AbstractLineTracker.Request
Modifier and Type | Field and Description |
---|---|
static String[] |
DELIMITERS
The predefined delimiters of this tracker
|
Constructor and Description |
---|
DefaultLineTracker()
Creates a standard line tracker.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getLegalLineDelimiters()
Returns the strings this tracker considers as legal line delimiters.
|
protected AbstractLineTracker.DelimiterInfo |
nextDelimiterInfo(String text,
int offset)
Returns the information about the first delimiter found in the given text starting at the
given offset.
|
checkRewriteSession, computeNumberOfLines, flushRewriteSession, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineNumberOfOffset, getLineOffset, getNumberOfLines, getNumberOfLines, hasActiveRewriteSession, replace, set, startRewriteSession, stopRewriteSession
public static final String[] DELIMITERS
public String[] getLegalLineDelimiters()
ILineTracker
protected AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset)
AbstractLineTracker
nextDelimiterInfo
in class AbstractLineTracker
text
- the text to be searchedoffset
- the offset in the given textnull
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.