Package aQute.bnd.properties
Class LineTracker
- java.lang.Object
-
- aQute.bnd.properties.LineTracker
-
public class LineTracker extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LineTracker()
Creates a new line tracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeNumberOfLines(java.lang.String text)
java.lang.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(java.lang.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, java.lang.String text)
void
set(java.lang.String text)
-
-
-
Method Detail
-
getLineLength
public final int getLineLength(int line) throws BadLocationException
- Throws:
BadLocationException
-
getLineNumberOfOffset
public final int getLineNumberOfOffset(int position) throws BadLocationException
- Throws:
BadLocationException
-
getLineInformationOfOffset
public final IRegion getLineInformationOfOffset(int position) throws BadLocationException
- Throws:
BadLocationException
-
getLineInformation
public final IRegion getLineInformation(int line) throws BadLocationException
- Throws:
BadLocationException
-
getLineOffset
public final int getLineOffset(int line) throws BadLocationException
- Throws:
BadLocationException
-
getNumberOfLines
public final int getNumberOfLines()
-
getNumberOfLines
public final int getNumberOfLines(int position, int length) throws BadLocationException
- Throws:
BadLocationException
-
computeNumberOfLines
public final int computeNumberOfLines(java.lang.String text)
-
getLineDelimiter
public final java.lang.String getLineDelimiter(int line) throws BadLocationException
- Throws:
BadLocationException
-
nextDelimiterInfo
protected Document.DelimiterInfo nextDelimiterInfo(java.lang.String text, int offset)
Returns the information about the first delimiter found in the given text starting at the given offset.- Parameters:
text
- the text to be searchedoffset
- the offset in the given text- Returns:
- the information of the first found delimiter or
null
-
replace
public final void replace(int position, int length, java.lang.String text) throws BadLocationException
- Throws:
BadLocationException
-
set
public final void set(java.lang.String text)
-
-