|
org.netbeans.api.debugger/1 1.11 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| 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.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. |
| Class Summary | |
|---|---|
| ActionsManager | Manages some set of actions. |
| ActionsManagerAdapter | Empty implementation of ActionsManagerListener. |
| Breakpoint | Abstract definition 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
registerred in "META-INF/debugger/". |
| Properties | Utility class hepls store properties. |
| Session | Session visually represents one process or application. |
| Watch | Abstract definition of watch. |
| Enum Summary | |
|---|---|
| Breakpoint.HIT_COUNT_FILTERING_STYLE | The style of filtering of hit counts. |
| Breakpoint.VALIDITY | Validity values |
The NetBeans Debugger Core API definition. Debugger Core API interfaces
allows to install differrent debugger inlementations to one IDE, and
share some UI components among them.
DebuggerManager represents root of this
tree. It manages list of Breakpoints,
Watches and running Sessions. 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 ->DebuggerEngine1>
<programming language 2 ->DebuggerEngine2>
...
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[]), 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.ActionProviders. It contains mapping between
action constant and ActionProvider registerred for this constant. For
example:public class JPDAStepIntoAction extends ActionsProviderSupport {
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
}
}
And JPDAStepIntoAction should be registerred in file: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
ActionsManagerListeners 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 ActionsProviders 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
|<-- <-|- <-- |
|
org.netbeans.api.debugger/1 1.11 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||