org.netbeans.api.debugger/1 1.7.22

Class DebuggerEngine

  extended by org.netbeans.api.debugger.DebuggerEngine

public final class DebuggerEngine
extends Object

Debugger Engine represents implementation of one debugger (Java Debugger, CPP Debugger). It can support debugging of one or more Sessions, in one or more languages. It provides root of threads hierarchy (call stacks, locals) and manages debugger actions.

Functionality Support for actions: DebuggerEngine manages list of actions (getActionsManager()). Debugger action (implemented by ActionsProvider) can be registerred to DebuggerEngine during a start of debugger. See ActionsProvider. ActionsManager can be used to call some debugger action (ActionsManager.doAction(java.lang.Object)) and to distinguish availability of action (ActionsManager.isEnabled(java.lang.Object)). Example how to call Kill Action on this engine:
    engine.getActionsManager ().doAction (ActionsManager.ACTION_KILL);

Support for aditional services: DebuggerEngine is final class. That is why the standard method how to extend its functionality is using lookup methods (lookup and lookupFirst(java.lang.String, java.lang.Class)). There are two ways how to register some service provider for some type of DebuggerEngine:
  • Register 'live' instance of service provider during creation of new instance of DebuggerEngine (see method DebuggerEngineProvider.getServices()).
  • Register service provider in Manifest-inf/debugger/<type ID> folder. See Debugger SPI for more information about registration.

Support for listening: DebuggerEngine propagates all changes to two type of listeners - general PropertyChangeListener and specific ActionsManagerListener.
Clinents / Providers This class is final, so it does not have any external provider. Debugger Plug-ins and UI modules are clients of this class.
Lifecycle A new instance(s) of DebuggerEngine class are created in Debugger Core module only, during the process of starting of debugging (see DebuggerManager.startDebugging(org.netbeans.api.debugger.DebuggerInfo). DebuggerEngine is removed automatically from DebuggerManager when the the last action is (ActionsManager.ACTION_KILL).
Evolution No method should be removed from this class, but some functionality can be added in future.

Nested Class Summary
 class DebuggerEngine.Destructor
          This class notifies about DebuggerEngine remove from the system, and about changes in language support.
Method Summary
 ActionsManager getActionsManager()
 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.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public List lookup(String folder,
                   Class service)
Returns list of services of given type from given folder.

service - a type of service to look for
list of services of given type


public Object lookupFirst(String folder,
                          Class service)
Returns one service of given type from given folder.

service - a type of service to look for
ne service of given type


public ActionsManager getActionsManager()

org.netbeans.api.debugger/1 1.7.22

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