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 protectedLineTracker()Creates a new line tracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomputeNumberOfLines(java.lang.String text)java.lang.StringgetLineDelimiter(int line)IRegiongetLineInformation(int line)IRegiongetLineInformationOfOffset(int position)intgetLineLength(int line)intgetLineNumberOfOffset(int position)intgetLineOffset(int line)intgetNumberOfLines()intgetNumberOfLines(int position, int length)protected Document.DelimiterInfonextDelimiterInfo(java.lang.String text, int offset)Returns the information about the first delimiter found in the given text starting at the given offset.voidreplace(int position, int length, java.lang.String text)voidset(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)
-
-