|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.api.debugger.DebuggerManager
The root class of Debugger APIs. DebuggerManager manages list of
Sessions,
Breakpoints and
Watches.
| Description | |
| Functionality |
Start & finish debugging:
DebuggerManager manages a process of starting a new debugging (
startDebugging(org.netbeans.api.debugger.DebuggerInfo)). It cooperates with all installed
DebuggerEngineProviders to create a new
Session (or Sessions) and a new
DebuggerEngine (or Engines).
It supports kill all sessions too (finishAllSessions()).
Sessions management: DebuggerManager keeps list of all Sessions (getSessions()),
and manages current session (getCurrentSession(),
setCurrentSession(org.netbeans.api.debugger.Session)).
Engine management: DebuggerManager provides current engine ( getCurrentEngine()).
Current engine is derivated from current session. So,
debuggerManager.getCurrentEngine () == debuggerManager.
getCurrentSession.getCurrentEngine ()
should be always true.
Breakpoints management: DebuggerManager keeps list of all shared breakpoints ( getBreakpoints()).
Breakpoint can be added (addBreakpoint(org.netbeans.api.debugger.Breakpoint)) and removed
(removeBreakpoint(org.netbeans.api.debugger.Breakpoint)).
Watches management: DebuggerManager keeps list of all shared watches ( getWatches()).
Watch can be created & added (createWatch(java.lang.String)).
Support for listening: DebuggerManager propagates all changes to two type of listeners - general PropertyChangeListener and specific
DebuggerManagerListener.
|
| Clinents / Providers |
DebuggerCore module should be the only one provider of this abstract class.
This class should be called from debugger plug-in modules and from debugger
UI modules.
|
| Lifecycle |
The only one instance of DebuggerManager should exist, and it should be
created in getDebuggerManager() method.
|
| Evolution | No method should be removed from this class, but some functionality can be added. |
| Field Summary | |
static String |
PROP_BREAKPOINTS
Name of property for the set of breakpoints in the system. |
static String |
PROP_BREAKPOINTS_INIT
Name of property for the set of breakpoints in the system. |
static String |
PROP_CURRENT_ENGINE
Name of property for current debugger engine. |
static String |
PROP_CURRENT_SESSION
Name of property for current debugger session. |
static String |
PROP_DEBUGGER_ENGINES
Name of property for set of running debugger engines. |
static String |
PROP_SESSIONS
Name of property for set of running debugger sessions. |
static String |
PROP_WATCHES
Name of property for the set of watches in the system. |
static String |
PROP_WATCHES_INIT
Name of property for the set of watches in the system. |
| Method Summary | |
void |
addBreakpoint(Breakpoint breakpoint)
Adds a new breakpoint. |
void |
addDebuggerListener(DebuggerManagerListener l)
This listener notificates about changes of breakpoints, watches and threads. |
void |
addDebuggerListener(String propertyName,
DebuggerManagerListener l)
Add a debuggerManager listener to changes of watches and breakpoints. |
Watch |
createWatch(String expr)
Creates a watch with its expression set to an initial value. |
void |
finishAllSessions()
Kills all Sessions and
DebuggerEngines. |
ActionsManager |
getActionsManager()
|
Breakpoint[] |
getBreakpoints()
Gets all registered breakpoints. |
DebuggerEngine |
getCurrentEngine()
Returns current debugger engine or null. |
Session |
getCurrentSession()
Returns current debugger session or null. |
DebuggerEngine[] |
getDebuggerEngines()
Returns set of running debugger engines. |
static DebuggerManager |
getDebuggerManager()
Returns default instance of DebuggerManager. |
Session[] |
getSessions()
Returns set of running debugger sessions. |
Watch[] |
getWatches()
Gets all shared watches in the system. |
List |
lookup(String folder,
Class service)
Returns list of services of given type from given folder. |
Object |
lookupFirst(String folder,
Class service)
Returns one service of given type from given folder. |
void |
removeAllWatches()
Removes all watches from the system. |
void |
removeBreakpoint(Breakpoint breakpoint)
Removes breakpoint. |
void |
removeDebuggerListener(DebuggerManagerListener l)
Removes debugger listener. |
void |
removeDebuggerListener(String propertyName,
DebuggerManagerListener l)
Remove a debuggerManager listener to changes of watches and breakpoints. |
void |
setCurrentSession(Session session)
Sets current debugger session. |
DebuggerEngine[] |
startDebugging(DebuggerInfo info)
Start a new debugging for given DebuggerInfo. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PROP_BREAKPOINTS_INIT
public static final String PROP_BREAKPOINTS
public static final String PROP_CURRENT_ENGINE
public static final String PROP_CURRENT_SESSION
public static final String PROP_SESSIONS
public static final String PROP_DEBUGGER_ENGINES
public static final String PROP_WATCHES
public static final String PROP_WATCHES_INIT
| Method Detail |
public static DebuggerManager getDebuggerManager()
public ActionsManager getActionsManager()
public List lookup(String folder, Class service)
service - a type of service to look for
public Object lookupFirst(String folder, Class service)
service - a type of service to look for
public DebuggerEngine[] startDebugging(DebuggerInfo info)
DebuggerInfo. DebuggerInfo provides
information needed to start new debugging. DebuggerManager finds
all SessionProviders and
DelegatingSessionProviders
installed for given DebuggerInfo, and creates a new
Session(s).
After that it looks for all
DebuggerEngineProviders and
DelegatingDebuggerEngineProviders
installed for Session, and crates a new
DebuggerEngine(s).
info - debugger startup info
public void finishAllSessions()
Sessions and
DebuggerEngines.
public Session getCurrentSession()
null.
nullpublic void setCurrentSession(Session session)
session - a session to be currentpublic Session[] getSessions()
public DebuggerEngine[] getDebuggerEngines()
public DebuggerEngine getCurrentEngine()
null.
nullpublic void addBreakpoint(Breakpoint breakpoint)
breakpoint - a new breakpointpublic void removeBreakpoint(Breakpoint breakpoint)
breakpoint - a breakpoint to be removedpublic Breakpoint[] getBreakpoints()
public Watch createWatch(String expr)
expr - expression to watch for (the format is the responsibility
of the debugger plug-in implementation, but it is typically
a variable name).
public Watch[] getWatches()
public void removeAllWatches()
public void addDebuggerListener(DebuggerManagerListener l)
l - listener object.public void removeDebuggerListener(DebuggerManagerListener l)
l - listener object.public void addDebuggerListener(String propertyName, DebuggerManagerListener l)
propertyName - a name of property to listen onl - the debuggerManager listener to addpublic void removeDebuggerListener(String propertyName, DebuggerManagerListener l)
propertyName - a name of property to listen onl - the debuggerManager listener to remove
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||