|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.text.Line
Represents one line in a text document. The line number may change when the text is modified, but the identity of the line is retained. It is designed to allow line-dependent modules of the IDE (such as the compiler and debugger) to make use of a line consistently even as the text is modified.
Inner Class Summary | |
static class |
Line.Set
Object that represents a snapshot of lines at the time it was created. |
Field Summary | |
static int |
SHOW_GOTO
Opens the editor if necessary, shows the line, and takes the focus. |
static int |
SHOW_SHOW
Opens the editor if necessary and shows the line. |
static int |
SHOW_TRY_SHOW
Shows the line only if the editor is open. |
Constructor Summary | |
Line(DataObject obj)
Create a new line object based on a given data object. |
Method Summary | |
boolean |
canBeMarkedCurrent(int action,
Line previousLine)
Method that should allow the debugger to communicate with lines that wants to have a control over the current line of debugger. |
DataObject |
getDataObject()
Get the data object this line is a part of. |
String |
getDisplayName()
Composes a human presentable name for the line. |
abstract int |
getLineNumber()
Get the line number. |
abstract boolean |
isBreakpoint()
Test if there is a breakpoint set at this line. |
abstract void |
markCurrentLine()
Mark this line as current. |
abstract void |
markError()
Mark an error at this line. |
abstract void |
setBreakpoint(boolean b)
Set or clear a (debugger) breakpoint at this line. |
void |
show(int kind)
Shows the line (at the first column). |
abstract void |
show(int kind,
int column)
Show the line. |
abstract void |
unmarkCurrentLine()
Unmark this line as current. |
abstract void |
unmarkError()
Unmark error at this line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SHOW_TRY_SHOW
show
public static final int SHOW_SHOW
show
public static final int SHOW_GOTO
show
Constructor Detail |
public Line(DataObject obj)
obj
- the data object this line is a part ofMethod Detail |
public String getDisplayName()
public final DataObject getDataObject()
public abstract int getLineNumber()
Line.Set lineSet =Line l = l.equals (lineSet.getCurrent (l.getLineNumber ()))
public abstract void show(int kind, int column)
kind
- one of SHOW_TRY_SHOW
, SHOW_SHOW
, or SHOW_GOTO
column
- the column of this line which should be selectedpublic void show(int kind)
kind
- one of SHOW_TRY_SHOW
, SHOW_SHOW
, or SHOW_GOTO
show(int, int)
public abstract void setBreakpoint(boolean b)
b
- true
to turn onpublic abstract boolean isBreakpoint()
true
is there ispublic abstract void markError()
public abstract void unmarkError()
public abstract void markCurrentLine()
public abstract void unmarkCurrentLine()
public boolean canBeMarkedCurrent(int action, Line previousLine)
The default implementation simply returns true.
action
- type of action that is trying to mark this line as current
one of constants (Debugger.ACTION_BREAKPOINT_HIT,
Debugger.ACTION_TRACE_OVER, etc.)previousLine
- previous line (if any) or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |