站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.1

EditorContext (NetBeans Debugger JPDA API) - NetBeans API Javadoc 5.5.1

org.netbeans.api.debugger.jpda/2 2.4.31

org.netbeans.spi.debugger.jpda
Class EditorContext

java.lang.Object
  extended by org.netbeans.spi.debugger.jpda.EditorContext

public abstract class EditorContext
extends Object

Defines bridge to editor and src hierarchy. It allows to use different source viewer for debugger (like some UML view).


Field Summary
static String BREAKPOINT_ANNOTATION_TYPE
          Annotation type constant.
static String CALL_STACK_FRAME_ANNOTATION_TYPE
          Annotation type constant.
static String CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
          Annotation type constant.
static String CURRENT_LINE_ANNOTATION_TYPE
          Annotation type constant.
static String DISABLED_BREAKPOINT_ANNOTATION_TYPE
          Annotation type constant.
static String DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
          Annotation type constant.
static String PROP_LINE_NUMBER
          Property name constant.
 
Constructor Summary
EditorContext()
           
 
Method Summary
abstract  void addPropertyChangeListener(PropertyChangeListener l)
          Adds a property change listener.
abstract  void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
          Adds a property change listener.
abstract  Object annotate(String url, int lineNumber, String annotationType, Object timeStamp)
          Adds annotation to given url on given line.
abstract  void createTimeStamp(Object timeStamp)
          Creates a new time stamp.
abstract  void disposeTimeStamp(Object timeStamp)
          Disposes given time stamp.
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.
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.
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

BREAKPOINT_ANNOTATION_TYPE

public static final String BREAKPOINT_ANNOTATION_TYPE
Annotation type constant.


DISABLED_BREAKPOINT_ANNOTATION_TYPE

public static final String DISABLED_BREAKPOINT_ANNOTATION_TYPE
Annotation type constant.


CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE

public static final String CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
Annotation type constant.


DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE

public static final String DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE
Annotation type constant.


CURRENT_LINE_ANNOTATION_TYPE

public static final String CURRENT_LINE_ANNOTATION_TYPE
Annotation type constant.


CALL_STACK_FRAME_ANNOTATION_TYPE

public static final String CALL_STACK_FRAME_ANNOTATION_TYPE
Annotation type constant.


PROP_LINE_NUMBER

public static final String PROP_LINE_NUMBER
Property name constant.

Constructor Detail

EditorContext

public EditorContext()
Method Detail

showSource

public abstract boolean showSource(String url,
                                   int lineNumber,
                                   Object timeStamp)
Shows source with given url on given line number.

Parameters:
url - a url of source to be shown
lineNumber - a number of line to be shown
timeStamp - a time stamp to be used

createTimeStamp

public abstract void createTimeStamp(Object timeStamp)
Creates a new time stamp.

Parameters:
timeStamp - a new time stamp

disposeTimeStamp

public abstract void disposeTimeStamp(Object timeStamp)
Disposes given time stamp.

Parameters:
timeStamp - a time stamp to be disposed

updateTimeStamp

public abstract void updateTimeStamp(Object timeStamp,
                                     String url)
Updates timeStamp for gived url.

Parameters:
timeStamp - time stamp to be updated
url - an url

annotate

public abstract Object annotate(String url,
                                int lineNumber,
                                String annotationType,
                                Object timeStamp)
Adds annotation to given url on given line.

Parameters:
url - a url of source annotation should be set into
lineNumber - a number of line annotation should be set into
annotationType - a type of annotation to be set
timeStamp - a time stamp to be used
Returns:
annotation or null, when the annotation can not be created at the given URL or line number.

getLineNumber

public abstract int getLineNumber(Object annotation,
                                  Object timeStamp)
Returns line number given annotation is associated with.

Parameters:
annotation - a annotation
timeStamp - a time stamp to be used
Returns:
line number given annotation is associated with

removeAnnotation

public abstract void removeAnnotation(Object annotation)
Removes given annotation.


getCurrentLineNumber

public abstract int getCurrentLineNumber()
Returns number of line currently selected in editor or -1.

Returns:
number of line currently selected in editor or -1

getCurrentClassName

public abstract String getCurrentClassName()
Returns name of class currently selected in editor or empty string.

Returns:
name of class currently selected in editor or empty string

getCurrentURL

public abstract String getCurrentURL()
Returns URL of source currently selected in editor or empty string.

Returns:
URL of source currently selected in editor or empty string

getCurrentMethodName

public abstract String getCurrentMethodName()
Returns name of method currently selected in editor or empty string.

Returns:
name of method currently selected in editor or empty string

getCurrentFieldName

public abstract String getCurrentFieldName()
Returns name of field currently selected in editor or null.

Returns:
name of field currently selected in editor or null

getSelectedIdentifier

public abstract String getSelectedIdentifier()
Returns identifier currently selected in editor or null.

Returns:
identifier currently selected in editor or null

getSelectedMethodName

public abstract String getSelectedMethodName()
Returns method name currently selected in editor or empty string.

Returns:
method name currently selected in editor or empty string

getFieldLineNumber

public abstract int getFieldLineNumber(String url,
                                       String className,
                                       String fieldName)
Returns line number of given field in given class.

Parameters:
url - the url of file the class is deined in
className - the name of class (or innerclass) the field is defined in
fieldName - the name of field
Returns:
line number or -1

getClassName

public abstract String getClassName(String url,
                                    int lineNumber)
Returns class name for given url and line number or null.

Parameters:
url - a url
lineNumber - a line number
Returns:
class name for given url and line number or null

getImports

public abstract String[] getImports(String url)
Returns list of imports for given source url.

Parameters:
url - the url of source file
Returns:
list of imports for given source url

addPropertyChangeListener

public abstract void addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener.

Parameters:
l - the listener to add

removePropertyChangeListener

public abstract void removePropertyChangeListener(PropertyChangeListener l)
Removes a property change listener.

Parameters:
l - the listener to remove

addPropertyChangeListener

public abstract void addPropertyChangeListener(String propertyName,
                                               PropertyChangeListener l)
Adds a property change listener.

Parameters:
propertyName - the name of property
l - the listener to add

removePropertyChangeListener

public abstract void removePropertyChangeListener(String propertyName,
                                                  PropertyChangeListener l)
Removes a property change listener.

Parameters:
propertyName - the name of property
l - the listener to remove

org.netbeans.api.debugger.jpda/2 2.4.31

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.