public class LineTracker extends Object
Modifier | Constructor and Description |
---|---|
protected |
LineTracker()
Creates a new line tracker.
|
Modifier and Type | Method and Description |
---|---|
int |
computeNumberOfLines(String text) |
String |
getLineDelimiter(int line) |
IRegion |
getLineInformation(int line) |
IRegion |
getLineInformationOfOffset(int position) |
int |
getLineLength(int line) |
int |
getLineNumberOfOffset(int position) |
int |
getLineOffset(int line) |
int |
getNumberOfLines() |
int |
getNumberOfLines(int position,
int length) |
protected Document.DelimiterInfo |
nextDelimiterInfo(String text,
int offset)
Returns the information about the first delimiter found in the given text
starting at the given offset.
|
void |
replace(int position,
int length,
String text) |
void |
set(String text) |
public final int getLineLength(int line) throws BadLocationException
BadLocationException
public final int getLineNumberOfOffset(int position) throws BadLocationException
BadLocationException
public final IRegion getLineInformationOfOffset(int position) throws BadLocationException
BadLocationException
public final IRegion getLineInformation(int line) throws BadLocationException
BadLocationException
public final int getLineOffset(int line) throws BadLocationException
BadLocationException
public final int getNumberOfLines()
public final int getNumberOfLines(int position, int length) throws BadLocationException
BadLocationException
public final int computeNumberOfLines(String text)
public final String getLineDelimiter(int line) throws BadLocationException
BadLocationException
protected Document.DelimiterInfo nextDelimiterInfo(String text, int offset)
text
- the text to be searchedoffset
- the offset in the given textnull
public final void replace(int position, int length, String text) throws BadLocationException
BadLocationException
public final void set(String text)
Copyright © 2021 aQute SARL. All rights reserved.