|
org.netbeans.api.debugger.jpda/2 2.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.debugger.jpda.EditorContext
public abstract class EditorContext
Defines bridge to editor and src hierarchy. It allows to use different source viewer for debugger (like some UML view).
| Nested Class Summary | |
|---|---|
static interface |
EditorContext.BytecodeProvider
A provider of method bytecode information. |
static class |
EditorContext.MethodArgument
Representation of an argument to a method. |
static class |
EditorContext.Operation
The operation definition. |
static class |
EditorContext.Position
Representation of a position in a source code. |
| Constructor Summary | |
|---|---|
EditorContext()
|
|
| Method Summary | |
|---|---|
protected void |
addNextOperationTo(EditorContext.Operation operation,
EditorContext.Operation next)
Assign a next operation, concatenates operations. |
abstract void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener. |
abstract void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
Adds a property change listener. |
Object |
annotate(String url,
int startPosition,
int endPosition,
String annotationType,
Object timeStamp)
Adds annotation to given url on given character range. |
abstract Object |
annotate(String url,
int lineNumber,
String annotationType,
Object timeStamp)
Adds annotation to given url on given line. |
protected EditorContext.Operation |
createMethodOperation(EditorContext.Position startPosition,
EditorContext.Position endPosition,
EditorContext.Position methodStartPosition,
EditorContext.Position methodEndPosition,
String methodName,
String methodClassType,
int bytecodeIndex)
Creates a method operation. |
protected EditorContext.Position |
createPosition(int offset,
int line,
int column)
Creates a new EditorContext.Position object. |
abstract void |
createTimeStamp(Object timeStamp)
Creates a new time stamp. |
abstract void |
disposeTimeStamp(Object timeStamp)
Disposes given time stamp. |
EditorContext.MethodArgument[] |
getArguments(String url,
EditorContext.Operation operation)
Get a list of arguments to the given operation. |
EditorContext.MethodArgument[] |
getArguments(String url,
int methodLineNumber)
Get a list of arguments passed to method located at the given line. |
abstract String |
getClassName(String url,
int lineNumber)
Returns class name for given url and line number or null. |
abstract String |
getCurrentClassName()
Returns name of class currently selected in editor or empty string. |
abstract String |
getCurrentFieldName()
Returns name of field currently selected in editor or null. |
abstract int |
getCurrentLineNumber()
Returns number of line currently selected in editor or -1. |
String[] |
getCurrentMethodDeclaration()
Returns name and signature of method declaration currently selected in editor, or null. |
abstract String |
getCurrentMethodName()
Returns name of method currently selected in editor or empty string. |
abstract String |
getCurrentURL()
Returns URL of source currently selected in editor or empty string. |
abstract int |
getFieldLineNumber(String url,
String className,
String fieldName)
Returns line number of given field in given class. |
abstract String[] |
getImports(String url)
Returns list of imports for given source url. |
abstract int |
getLineNumber(Object annotation,
Object timeStamp)
Returns line number given annotation is associated with. |
int |
getMethodLineNumber(String url,
String className,
String methodName,
String methodSignature)
Returns line number of given method in given class. |
EditorContext.Operation[] |
getOperations(String url,
int lineNumber,
EditorContext.BytecodeProvider bytecodeProvider)
Get the list of operations that are in expression(s) located at the given line. |
abstract String |
getSelectedIdentifier()
Returns identifier currently selected in editor or null. |
abstract String |
getSelectedMethodName()
Returns method name currently selected in editor or empty string. |
abstract void |
removeAnnotation(Object annotation)
Removes given annotation. |
abstract void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a property change listener. |
abstract void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
Removes a property change listener. |
abstract boolean |
showSource(String url,
int lineNumber,
Object timeStamp)
Shows source with given url on given line number. |
abstract void |
updateTimeStamp(Object timeStamp,
String url)
Updates timeStamp for gived url. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BREAKPOINT_ANNOTATION_TYPE
public static final String DISABLED_BREAKPOINT_ANNOTATION_TYPE
public static final String CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
public static final String DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
public static final String FIELD_BREAKPOINT_ANNOTATION_TYPE
public static final String DISABLED_FIELD_BREAKPOINT_ANNOTATION_TYPE
public static final String METHOD_BREAKPOINT_ANNOTATION_TYPE
public static final String DISABLED_METHOD_BREAKPOINT_ANNOTATION_TYPE
public static final String CURRENT_LINE_ANNOTATION_TYPE
public static final String CALL_STACK_FRAME_ANNOTATION_TYPE
public static final String CURRENT_LAST_OPERATION_ANNOTATION_TYPE
public static final String CURRENT_OUT_OPERATION_ANNOTATION_TYPE
public static final String CURRENT_EXPRESSION_SECONDARY_LINE_ANNOTATION_TYPE
public static final String CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE
public static final String PROP_LINE_NUMBER
| Constructor Detail |
|---|
public EditorContext()
| Method Detail |
|---|
public abstract boolean showSource(String url, int lineNumber, Object timeStamp)
url - a url of source to be shownlineNumber - a number of line to be showntimeStamp - a time stamp to be usedpublic abstract void createTimeStamp(Object timeStamp)
timeStamp - a new time stamppublic abstract void disposeTimeStamp(Object timeStamp)
timeStamp - a time stamp to be disposedpublic abstract void updateTimeStamp(Object timeStamp, String url)
timeStamp - time stamp to be updatedurl - an urlpublic abstract Object annotate(String url, int lineNumber, String annotationType, Object timeStamp)
url - a url of source annotation should be set intolineNumber - a number of line annotation should be set intoannotationType - a type of annotation to be settimeStamp - a time stamp to be used
null, when the annotation can not be
created at the given URL or line number.public Object annotate(String url, int startPosition, int endPosition, String annotationType, Object timeStamp)
url - a url of source annotation should be set intostartPosition - the offset of the starting position of the annotationendPosition - the offset of the ending position of the annotationannotationType - a type of annotation to be set
null, when the annotation can not be
created at the given URL or line number.public abstract int getLineNumber(Object annotation, Object timeStamp)
annotation - a annotationtimeStamp - a time stamp to be used
public abstract void removeAnnotation(Object annotation)
public abstract int getCurrentLineNumber()
-1.
-1public abstract String getCurrentClassName()
public abstract String getCurrentURL()
public abstract String getCurrentMethodName()
public abstract String getCurrentFieldName()
null.
nullpublic abstract String getSelectedIdentifier()
null.
nullpublic abstract String getSelectedMethodName()
public abstract int getFieldLineNumber(String url, String className, String fieldName)
url - the url of source file the class is deined inclassName - the name of class (or innerclass) the field is
defined infieldName - the name of field
public int getMethodLineNumber(String url, String className, String methodName, String methodSignature)
url - the url of source file the class is deined inclassName - the name of class (or innerclass) the method is
defined inmethodName - the name of the methodmethodSignature - the JNI-style signature of the method.
If null, then the first method found is returned.
public String[] getCurrentMethodDeclaration()
null.
null.public abstract String getClassName(String url, int lineNumber)
url - a urllineNumber - a line number
public abstract String[] getImports(String url)
url - the url of source file
protected final EditorContext.Operation createMethodOperation(EditorContext.Position startPosition, EditorContext.Position endPosition, EditorContext.Position methodStartPosition, EditorContext.Position methodEndPosition, String methodName, String methodClassType, int bytecodeIndex)
startPosition - The starting position of the operationendPosition - The ending position of the operationmethodStartPosition - The starting position of the method namemethodEndPosition - The ending position of the method namemethodName - The string representation of the method namemethodClassType - The class type, which defines this methodbytecodeIndex - The bytecode index of this method callprotected final void addNextOperationTo(EditorContext.Operation operation, EditorContext.Operation next)
operation - The first operationnext - The next operationprotected final EditorContext.Position createPosition(int offset, int line, int column)
EditorContext.Position object.
offset - The offsetline - The line numbercolumn - The column numberpublic EditorContext.Operation[] getOperations(String url, int lineNumber, EditorContext.BytecodeProvider bytecodeProvider)
url - The file's URLlineNumber - The line numberbytecodeProvider - The provider of method bytecodes.public EditorContext.MethodArgument[] getArguments(String url, EditorContext.Operation operation)
url - The URL of the source file with the operationoperation - The operationpublic EditorContext.MethodArgument[] getArguments(String url, int methodLineNumber)
url - The URL of the source filemethodLineNumber - The line number of the method headerpublic abstract void addPropertyChangeListener(PropertyChangeListener l)
l - the listener to addpublic abstract void removePropertyChangeListener(PropertyChangeListener l)
l - the listener to removepublic abstract void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
propertyName - the name of propertyl - the listener to addpublic abstract void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
propertyName - the name of propertyl - the listener to remove
|
org.netbeans.api.debugger.jpda/2 2.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||