Interface | Description |
---|---|
ActionsManagerListener |
This listener notifies about changes in the
DebuggerEngine . |
DebuggerManagerListener |
This listener notifies about changes in the
DebuggerManager - breakpoints, watches
and sessions. |
LazyDebuggerManagerListener |
This
DebuggerManagerListener modification is designed to be
registered in
"META-INF/debugger/org.netbeans.api.debugger.LazyDebuggerManagerListener". |
Properties.Initializer |
Implementing this interface one can define initial values of properties.
|
Properties.Reader |
This class helps to store and read custom types using
Properties.setObject(java.lang.String, java.lang.Object) and Properties.getObject(java.lang.String, java.lang.Object) methods. |
SessionBridge.SessionChanger |
Implement this interface to handle a debug session change.
|
Watch.Pin |
A base interface for a watch pin location.
|
Class | Description |
---|---|
ActionsManager |
Manages some set of actions.
|
ActionsManagerAdapter |
Empty implementation of
ActionsManagerListener . |
ActiveBreakpoints |
This class handles an engine-related breakpoints activation/deactivation,
which is independent on their enabled/disabled state.
|
Breakpoint |
Abstract definition of breakpoint.
|
Breakpoint.GroupProperties |
Group properties of breakpoint.
|
DebuggerEngine |
Debugger Engine represents implementation of one debugger (Java Debugger,
CPP Debugger).
|
DebuggerInfo |
Contains information needed to start new debugging.
|
DebuggerManager |
The root class of Debugger APIs.
|
DebuggerManagerAdapter |
Empty implementation of
DebuggerManagerListener . |
LazyActionsManagerListener |
This
ActionsManagerListener modification is designed to be
registered in "META-INF/debugger/" , or preferably via the
LazyActionsManagerListener.Registration annotation. |
Properties |
Utility class helps store properties.
|
Session |
Session visually represents one process or application.
|
SessionBridge |
Bridge between sessions.
|
Watch |
Abstract definition of watch.
|
Enum | Description |
---|---|
Breakpoint.HIT_COUNT_FILTERING_STYLE |
The style of filtering of hit counts.
|
Breakpoint.VALIDITY |
Validity values
|
Annotation Type | Description |
---|---|
LazyActionsManagerListener.Registration |
Declarative registration of a LazyActionsManagerListener implementation.
|
DebuggerManager
represents root of this
tree. It manages list of Breakpoint
s,
Watch
es and running Session
s. All watches and breakpoints
registerred here are shared for all running sessions.Session
represents one process or
application running in debug mode. Each Session manages list of
supported programming languages. Support for each programming language
is represented by some instance of DebuggerEngine
. DebuggerEngine is a main
intergation point for all Debugger Plug-ins. Most of Service Providers
(like ActionsProvider
or different Models) should
be registered for
some concrete type of DebuggerEngine.DebuggerManager
|
|-Breakpoint
(s)
|
|-Watch
(es)
|
|-Session
(s) <programming language 1 ->DebuggerEngine
1>
<programming language 2 ->DebuggerEngine
2>
...
DebuggerManager.startDebugging(DebuggerInfo)
.
The only method how to remove something is DebuggerEngine.Destructor
.DebuggerManager
: methods DebuggerManager.lookup(String,Class)
and DebuggerManager.lookupFirst(String,Class)
DebuggerInfo
: methods DebuggerInfo.lookup(String,Class)
and DebuggerInfo.lookupFirst(String,Class)
Session
: methods Session.lookup(String,Class)
and Session.lookupFirst(String,Class)
DebuggerEngine
: methods DebuggerEngine.lookup(String,Class)
, DebuggerEngine.lookupFirst(String,Class)
, DebuggerManager.lookup(String,Class)
and DebuggerManager.lookupFirst(String,Class)
DebuggerInfo.create(String,Object[])
, SessionProvider.getServices()
and DebuggerEngineProvider.getServices()
. Second
possibility (and preferred one) is to register service to
Meta-inf/debugger folder. The way how to do it is described in Debugger
SPI documentation.DebuggerInfo
and DebuggerManager.startDebugging(DebuggerInfo)
method on the
begining of this process. DebuggerInfo determines a set of debugger
Sessions to be started:List sessionProviders = debuggerInfo.lookup (null, SessionsProvider.class);
Session
is created for every SessionProvider
after that. A set of
DebuggerEngines is created for each Session in the second step:List engineProviders = session.lookup (null, DebuggerEngineProvider.class);
DebuggerEngineProvider
drives creation of
one new instance of
DebuggerEngine
. So, the debugger start
process creates a tree of
new Sessions and new DebuggerEngines and registers them to the
DebuggerManager.
Thats all.DelegatingSessionProvider
interface is
designed to support first usecase. You should implement and register
this interface in Meta-inf/debugger, to delegate on some existing
Session. DelegatingDebuggerEngineProvider
.ActionsManager
(like ActionsManager.ACTION_STEP_INTO
). org.netbeans.spi.debugger.ActionProvider
s. It contains mapping between
action constant and ActionProvider registerred for this constant. For
example:public class JPDAStepIntoAction extends ActionsProviderSupport {And JPDAStepIntoAction should be registerred in file:
JPDAStepIntoAction () {
jpdaDebugger.add...Listener (
new Listener () {
public ...event () {
// set state of action here
setEnabled ( state );
}
}
);
}
public boolean doAction (Object action) {
// put implementation of action here
return true; // action successful
}
}
ActionsManager.doAction(Object)
for ActionsManager.ACTION_STEP_INTO
, when its
invoked by the user.ActionsManager
finds proper
ActionsProvider
registered for given
action. Than it calls ActionsProvider.doAction(Object)
.ActionsManager
notifies all
ActionsManagerListener
s about it, when the
action is done.user StepIntoAction DebuggerEngine StepIntoActionProvider DebuggerEngineListener
(javax.swing.Action) | (ActionsProvider) |
| | | |
o press -> actionPerformed (...) | | |
_|_ action calls | | |
| button currentDebuggerEngine. --> doAction (ACTION_STEP_INTO) | |
/ \ doAction | | |
(ACTION_STEP_INTO) finds ActionsProviders | |
| registerred for given action --> doAction (ACTION_STEP_INTO) |
| and calls doAction on them implementation of |
| | Step Into Action is here |
| | <-- | |
| fires PROP_ACTION_PERFORMED | |
| | --> -|-> actionPerformed (..)
| | | listener impl.
| <-- <-|- <-|- <--|
| | | |
ActionsProviderListener.actionStateChange(Object,boolean)
for ActionsManager.ACTION_STEP_INTO
.DebuggerEngine
is listenning on
all installed ActionsProvider
s and
fires all action state changes using org.netbeans.api.debugger.DebuggerEngineListener#actionStateChanged(Object,boolean)
.DebuggerEngine
, and it updates its state
when some actionStateChanged is fired.debugger StepIntoActionProvider DebuggerEngine.ActionsProviderListener StepIntoAction.DebuggerEngineListener
(ActionsProvider) | (javax.swing.Action)
| | |
_ state of -> fire action state | |
|?| action change --> actionStateChange (ACTION_STEP_INTO, enabled) |
¯ should be | | |
changed | fire DebuggerEngineListener |
| actionStateChanged --> actionStateChanged
| | updates a state
| | of action
|<-- <-|- <-- |