|
org.openide.text 6.9.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.text.Line.Set
public abstract static class Line.Set
Object that represents a snapshot of lines at the time it was created.
It is used to create a mapping from line
numbers to line objects, for example when the file is saved.
Such a mapping can then be used by the compiler, e.g., to find
the correct Line
object, assuming it has a line number.
Mappings of line numbers to line objects will survive modifications of the text, and continue to represent the original lines as close as possible. For example: if a new line is inserted at the 10th line of a document and the compiler module asks for the 25th line (because the compiler reports an error at line 25 in the saved file) via the line set, the 26th line of the current document will be marked as being in error.
Constructor Summary | |
---|---|
Line.Set()
Create a new snapshot. |
Method Summary | |
---|---|
abstract Line |
getCurrent(int line)
Find line object representing the line in current document. |
Date |
getDate()
Get creation time for this line set. |
abstract List |
getLines()
Returns a set of line objects sorted by their line numbers. |
abstract Line |
getOriginal(int line)
Find line object in the line set corresponding to original line number. |
int |
getOriginalLineNumber(Line line)
Finds an original line number for given line in this line set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Line.Set()
Method Detail |
---|
public abstract List getLines()
Line
public final Date getDate()
public abstract Line getOriginal(int line) throws IndexOutOfBoundsException
line
- number of the line
IndexOutOfBoundsException
- if line
is an invalid index for the original set of linespublic abstract Line getCurrent(int line) throws IndexOutOfBoundsException
line
- number of the line in current state of the document
IndexOutOfBoundsException
- if line
is an invalid index for the original set of linespublic int getOriginalLineNumber(Line line)
line
- the line to look for
|
org.openide.text 6.9.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |