public class ConfigurableLineTracker extends AbstractLineTracker
ILineTracker
.
The line tracker can be configured with the set of legal line delimiters. Line delimiters are unconstrained. The line delimiters are used to compute the tracker's line structure. In the case of overlapping line delimiters, the longest line delimiter is given precedence of the shorter ones.
This class is not intended to be subclassed.
AbstractLineTracker.DelimiterInfo, AbstractLineTracker.Request
Constructor and Description |
---|
ConfigurableLineTracker(String[] legalLineDelimiters)
Creates a standard line tracker for the given line delimiters.
|
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 ConfigurableLineTracker(String[] legalLineDelimiters)
legalLineDelimiters
- the tracker's legal line delimiters,
may not be null
and must be longer than 0public 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.