Package org.eclipse.jface.text
Class DefaultLineTracker
- java.lang.Object
-
- org.eclipse.jface.text.AbstractLineTracker
-
- org.eclipse.jface.text.DefaultLineTracker
-
- All Implemented Interfaces:
ILineTracker,ILineTrackerExtension
public class DefaultLineTracker extends AbstractLineTracker
Standard implementation ofILineTracker.The line tracker considers the three common line delimiters which are '\n', '\r', '\r\n'.
This class is not intended to be subclassed.
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.text.AbstractLineTracker
AbstractLineTracker.DelimiterInfo, AbstractLineTracker.Request
-
-
Field Summary
Fields Modifier and Type Field Description static String[]DELIMITERSThe predefined delimiters of this tracker
-
Constructor Summary
Constructors Constructor Description DefaultLineTracker()Creates a standard line tracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getLegalLineDelimiters()Returns the strings this tracker considers as legal line delimiters.protected AbstractLineTracker.DelimiterInfonextDelimiterInfo(String text, int offset)Returns the information about the first delimiter found in the given text starting at the given offset.-
Methods inherited from class org.eclipse.jface.text.AbstractLineTracker
checkRewriteSession, computeNumberOfLines, flushRewriteSession, getLineDelimiter, getLineInformation, getLineInformationOfOffset, getLineLength, getLineNumberOfOffset, getLineOffset, getNumberOfLines, getNumberOfLines, hasActiveRewriteSession, replace, set, startRewriteSession, stopRewriteSession
-
-
-
-
Field Detail
-
DELIMITERS
public static final String[] DELIMITERS
The predefined delimiters of this tracker
-
-
Method Detail
-
getLegalLineDelimiters
public String[] getLegalLineDelimiters()
Description copied from interface:ILineTrackerReturns the strings this tracker considers as legal line delimiters.- Returns:
- the legal line delimiters
-
nextDelimiterInfo
protected AbstractLineTracker.DelimiterInfo nextDelimiterInfo(String text, int offset)
Description copied from class:AbstractLineTrackerReturns the information about the first delimiter found in the given text starting at the given offset.- Specified by:
nextDelimiterInfoin classAbstractLineTracker- Parameters:
text- the text to be searchedoffset- the offset in the given text- Returns:
- the information of the first found delimiter or
null
-
-