public abstract class Debugger
extends java.lang.Object
Debugger
class provides methods that interact with the
debugger.Constructor and Description |
---|
Debugger() |
Modifier and Type | Method and Description |
---|---|
DebuggerExtenderCallback |
addDebuggerExtender(DebuggerExtender extender)
Deprecated.
Use addDebuggerExtender(DebuggerExtenderDeclarator) instead
|
void |
addDebuggerExtender(DebuggerExtenderDeclarator extenderDeclarator)
Programmatically add a DebuggerExtender, which can augment and
modify Debugger behavior.
|
void |
addDebuggerExtender(DebuggerExtenderDeclarator extenderDeclarator,
java.util.List<java.lang.String> sourceExtensions)
Programmatically add a DebuggerExtender, which can augment and
modify Debugger behavior.
|
void |
addDebuggerListener(DebuggerAdapter debuggerListener)
Add a DebuggerListener to the debugger
The preferred way to add DebuggerListeners is by
registering them in the extension.xml file of the extension.
|
DebuggerWindowProviderCallback |
addDebuggerWindowProvider(DebuggerWindowProvider provider)
Deprecated.
Use addDebuggerWindowProvider(DebuggerWindowProviderDeclarator)
instead
|
void |
addDebuggerWindowProvider(DebuggerWindowProviderDeclarator declarator)
Programmatically add a DebuggerWindowProvider, which will provide
a custom debugger window.
|
void |
addInspectorExpressionProvider(DebuggerInspectorExpressionProvider expressionProvider)
Add a DebuggerInspectorExpressionProvider which will be used to make a
suitable inspector expression when the user requests an inspect and there
is no selection in the editor
|
void |
addObjectPreferencesExpansion(java.lang.String className,
java.lang.String expressions,
boolean selected)
Add a string of items to evaluate when expanding objects of a specified class
in the debugger.
|
void |
addObjectPreferencesExpression(java.lang.String className,
java.lang.String expression,
boolean selected)
Add an expression to evaluate when displaying objects of a specified class
in the debugger.
|
void |
addObjectPreferencesHideAllFields(java.lang.String className)
Add an Object Preferences item indicating that all fields of a
class should be hidden when that class is expanded in the debugger.
|
void |
addObjectPreferencesHideField(java.lang.String className,
java.lang.String fieldName)
Add an Object Preferences item indicating that a field of a class
should be hidden when that class is expanded in the debugger
The preferred way to add Object Preferences hide fields is by
registering them in the extension.xml file of the extension:
<hooks>
<jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<debugger-hook>
<object-hide-field class="mytypes.MyType" field="myField" />
</debugger-hook>
</jdeveloper-hook>
</hooks>
|
void |
addObjectPreferencesIcon(java.lang.String className,
java.lang.String iconName)
Add an Object Preferences item indicating the icon that should be used
when a class of a certain name is displayed in the debugger data panes
The preferred way to add Object Preferences icons is by
registering them in the extension.xml file of the extension:
<hooks>
<jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<debugger-hook>
<object-icon class="mytypes.MyType" icon="/yourcompany/youricons/youricon.png" />
</debugger-hook>
</jdeveloper-hook>
</hooks>
|
abstract void |
addRunAndDebugToContextMenu(ContextMenu popup,
Context context) |
void |
addSmartDataProvider(SmartDataProvider smartDataProvider)
Add a SmartDataProvider to the debugger
The preferred way to add SmartDataProviders is by
registering them in the extension.xml file of the extension.
|
void |
addToolTipExpressionProvider(ToolTipExpressionProvider toolTipExpressionProvider)
Add a ToolTipExpressionProvider to the debugger
The preferred way to add ToolTipExpressionProviders is by
registering them in the extension.xml file of the extension.
|
abstract java.lang.Object |
evaluateNumericExpression(java.lang.String expression)
Have the debugger evaluate a numeric expression.
|
abstract ContextMenu |
getContextMenu()
Returns the
ContextMenu that the debugger uses in debugger
windows. |
static Debugger |
getDebugger()
Returns the active Debugger instance.
|
abstract java.util.List<DebuggerEventSource> |
getDebuggerState()
Return the state of any running debuggers.
|
abstract javax.swing.JMenu |
getDebugMenu()
Returns the Debug menu that the debugger has added to the main
menu bar.
|
javax.swing.JMenu |
getViewMenu()
Returns the View Debugger sub menu if it exists
|
abstract boolean |
isDebugging()
Returns true if the debugger is currently debugging one or more
processes.
|
abstract boolean |
isStackTraceLine(java.lang.String line) |
abstract java.net.URL |
parseStackTraceLine(Workspace workspace,
Project project,
java.lang.String stackTraceLine) |
abstract void |
redefineClasses(java.util.Map nameToGuts)
Deprecated.
|
abstract void |
redefineClasses(Project project,
java.util.Map nameToGuts)
Tells the debugger to redefine some classes that have been
recompiled.
|
void |
removeDebuggerExtender(DebuggerExtender extender)
Remove a previously added DebuggerExtender.
|
void |
removeDebuggerListener(DebuggerAdapter debuggerListener)
Removes a previously registered DebuggerListener
DebuggerListeners registered in a declarative way should not be removed
|
void |
removeDebuggerWindowProvider(DebuggerWindowProvider provider)
Remove a previously added DebuggerWindowProvider.
|
void |
removeInspectorExpressionProvider(DebuggerInspectorExpressionProvider expressionProvider)
Remove a previously added DebuggerInspectorExpressionProvider
DebuggerInspectorExpressionProviders registered in a declarative way should not be removed
|
void |
removeSmartDataProvider(SmartDataProvider smartDataProvider)
Removes a previously registered SmartDataProvider
SmartDataProviders registered in a declarative way should not be removed
|
void |
removeToolTipExpressionProvider(ToolTipExpressionProvider toolTipExpressionProvider)
Removes a previously registered ToolTipExpressionProvider
ToolTipExpressionProviders registered in a declarative way should not be removed
|
static void |
setDebugger(Debugger debugger)
Deprecated.
The Debugger should be registered in a declarative way, such as:
<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension"<
<triggers<
<singleton-provider-hook<
<singleton base-class="oracle.ide.runner.Debugger"
impl-class="oracle.jdevimpl.runner.debug.JDebugger" /<
</singleton-provider-hook<
</triggers<
</trigger-hooks<
|
abstract boolean |
showSourceFileForStackTraceLine(Workspace workspace,
Project project,
java.lang.String stackTraceLine) |
abstract boolean |
showSourceFileForStackTraceLine(Workspace workspace,
Project project,
java.net.URL urlWithLine) |
abstract void |
startDebugger(Context context,
DebuggerStartCallback callBack)
Start the debugger with the given context with the options of providing
a call back at different stages of the starting process
|
public static Debugger getDebugger()
@Deprecated public static void setDebugger(Debugger debugger)
public abstract javax.swing.JMenu getDebugMenu()
public abstract ContextMenu getContextMenu()
ContextMenu
that the debugger uses in debugger
windows.public javax.swing.JMenu getViewMenu()
public abstract boolean isDebugging()
public abstract void startDebugger(Context context, DebuggerStartCallback callBack)
context
- The context to start the debugger incallBack
- A call back to inform the caller of the progress@Deprecated public abstract void redefineClasses(java.util.Map nameToGuts)
nameToGuts
- a map where the keys are full class names
(String) and the values are the guts of the class file (byte[]).public abstract void redefineClasses(Project project, java.util.Map nameToGuts)
project
- the project that was recompilednameToGuts
- a map where the keys are full class names
(String) and the values are the guts of the class file (byte[]).public abstract boolean isStackTraceLine(java.lang.String line)
public abstract boolean showSourceFileForStackTraceLine(Workspace workspace, Project project, java.lang.String stackTraceLine)
public abstract java.net.URL parseStackTraceLine(Workspace workspace, Project project, java.lang.String stackTraceLine)
public abstract boolean showSourceFileForStackTraceLine(Workspace workspace, Project project, java.net.URL urlWithLine)
public final void addSmartDataProvider(SmartDataProvider smartDataProvider)
<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension">
<triggers trigger-id="Register My SmartDataProvider">
<debugger-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<smart-data-provider class="mypackage.MySmartDataProvider" />
</debugger-hook>
</triggers>
</trigger-hooks>
smartDataProvider
- - The SmartDataProviderpublic final void removeSmartDataProvider(SmartDataProvider smartDataProvider)
smartDataProvider
- - The SmartDataProviderpublic final void addToolTipExpressionProvider(ToolTipExpressionProvider toolTipExpressionProvider)
<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension">
<triggers trigger-id="Register My ToolTipExpressionProvider">
<debugger-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<tooltip-expression-provider class="mypackage.MyToolTipExpressionProvider" />
</debugger-hook>
</triggers>
</trigger-hooks>
toolTipExpressionProvider
- - The ToolTipExpressionProviderpublic final void removeToolTipExpressionProvider(ToolTipExpressionProvider toolTipExpressionProvider)
toolTipExpressionProvider
- - The ToolTipExpressionProviderpublic abstract void addRunAndDebugToContextMenu(ContextMenu popup, Context context)
popup
- The popup to add run/debug menu tocontext
- The contextpublic final void addDebuggerListener(DebuggerAdapter debuggerListener)
<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension">
<triggers trigger-id="Register My DebuggerListener">
<debugger-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<debugger-listener class="mypackage.MyDebuggerListener" />
</debugger-hook>
</triggers>
</trigger-hooks>
debuggerListener
- - The DebuggerListenerpublic final void removeDebuggerListener(DebuggerAdapter debuggerListener)
debuggerListener
- - The DebuggerListenerpublic abstract java.lang.Object evaluateNumericExpression(java.lang.String expression)
@Deprecated public DebuggerWindowProviderCallback addDebuggerWindowProvider(DebuggerWindowProvider provider)
provider
- A DebuggerWindowProvider which should not be nullpublic void addDebuggerWindowProvider(DebuggerWindowProviderDeclarator declarator)
declarator
- A DebuggerWindowProviderDeclarator which should not be nullpublic void removeDebuggerWindowProvider(DebuggerWindowProvider provider)
provider
- A DebuggerWindowProvider which should not be null@Deprecated public DebuggerExtenderCallback addDebuggerExtender(DebuggerExtender extender)
extender
- A DebuggerExtender which should not be nullpublic void addDebuggerExtender(DebuggerExtenderDeclarator extenderDeclarator)
extenderDeclarator
- A DebuggerExtenderDeclarator which should not be nullpublic void addDebuggerExtender(DebuggerExtenderDeclarator extenderDeclarator, java.util.List<java.lang.String> sourceExtensions)
extenderDeclarator
- A DebuggerExtenderDeclarator which should not be null.
The extender should implement the DebuggerExtender2 interface.sourceExtensions
- A list of source file extensions (minus the leading dot) that
the debugger extender claims ownership for.public void removeDebuggerExtender(DebuggerExtender extender)
extender
- A DebuggerExtender which should not be nullpublic final void addObjectPreferencesExpression(java.lang.String className, java.lang.String expression, boolean selected)
className
- the fully qualified name of a class for which to add an expression.expression
- the expression to evaluate.selected
- whether the expression is selected by default. If
false, the expression is available as one of the selectable
expressions for the className in the object preferences dialog.public final void addObjectPreferencesExpansion(java.lang.String className, java.lang.String expressions, boolean selected)
className
- the fully qualified name of a class to add an expression
for.expressions
- the string of items to evaluate.selected
- whether the expansion is selected by default. If
false, the expansion is available as one of the selectable
expansions for the className in the object preferences dialog.public final void addObjectPreferencesHideAllFields(java.lang.String className)
className
- the fully qualified name of a classpublic final void addObjectPreferencesHideField(java.lang.String className, java.lang.String fieldName)
className
- the fully qualified name of a classfieldName
- the name of a field of that classpublic final void addObjectPreferencesIcon(java.lang.String className, java.lang.String iconName)
className
- the fully qualified name of a classiconName
- the name of an icon such as "${OracleIcons.QUICK_NAV}" or
"/oracle/jdevimpl/runner/debug/images/verifiedbreakpoint.png"public final void addInspectorExpressionProvider(DebuggerInspectorExpressionProvider expressionProvider)
expressionProvider
- A DebuggerInspectorExpressionProvider which should
not be null
The preferred way to add DebuggerInspectorExpressionProviders is by
registering them in the extension.xml file of the extension. Use the fully
qualified name of a class that implements oracle.ide.runner.DebuggerInspectorExpressionProvider:
<trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension">
<triggers trigger-id="Register My ToolTipExpressionProvider">
<debugger-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<inspector-expression-provider class="mypackage.MyDebuggerInspectorExpressionProvider" />
</debugger-hook>
</triggers>
</trigger-hooks>
public final void removeInspectorExpressionProvider(DebuggerInspectorExpressionProvider expressionProvider)
expressionProvider
- A DebuggerInspectorExpressionProvider which should
not be nullpublic abstract java.util.List<DebuggerEventSource> getDebuggerState()