org.openide.debugger
Class DebuggerType

java.lang.Object
  |
  +--org.openide.ServiceType
        |
        +--org.openide.debugger.DebuggerType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DebuggerType.Default

public abstract class DebuggerType
extends ServiceType

Defines one debugger type. It has method start that accepts ExecInfo and should probably create new DebuggerInfo and call Debugger.startDebug (debuggerInfo). The type should be serializable, so it can be attached to file attributes of any object that wishes to be especially debugged.

This class currently has a property editor in the IDE's default editor search path.

See Also:
Serialized Form

Inner Class Summary
static class DebuggerType.Default
          Default debugger type.
 
Inner classes inherited from class org.openide.ServiceType
ServiceType.Handle, ServiceType.Registry
 
Fields inherited from class org.openide.ServiceType
PROP_NAME
 
Constructor Summary
DebuggerType()
           
 
Method Summary
static Enumeration debuggerTypes()
          Get all registered executors in the system's execution engine.
static DebuggerType find(Class clazz)
          Find the debugger implemented as a given class, among the executors registered to the execution engine.
static DebuggerType find(String name)
          Find the debugger with requested name, among the executors registered to the execution engine.
static DebuggerType getDefault()
          Deprecated. There is probably not a single debugger type meaningfully applicable to all file types. If you explicitly want to invoke the plain Debugger interfaces, use DebuggerType.Default instead.
 HelpCtx getHelpCtx()
          Get context help for this service type.
 void startDebugger(DataObject obj, boolean stopOnMain)
          Starts debugging for a dataobject.
abstract  void startDebugger(ExecInfo info, boolean stopOnMain)
          Should start the debugging of this type.
 
Methods inherited from class org.openide.ServiceType
addPropertyChangeListener, clone, createClone, displayName, firePropertyChange, getName, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebuggerType

public DebuggerType()
Method Detail

startDebugger

public abstract void startDebugger(ExecInfo info,
                                   boolean stopOnMain)
                            throws DebuggerException
Should start the debugging of this type.
Parameters:
info - class and parameters to run
stopOnMain - should the debugging stop on main method or go to first breakpoint
Throws:
DebuggerException - if debugger is not installed or cannot be started

startDebugger

public void startDebugger(DataObject obj,
                          boolean stopOnMain)
                   throws DebuggerException
Starts debugging for a dataobject. The default implementation starts debugging for a class with main() method with parameters taken from this object's primary file's attributes.
Parameters:
obj - object to run
stopOnMain - should the debugging stop on main method or go to first breakpoint
Throws:
DebuggerException - if debugger is not installed or cannot be started

getHelpCtx

public HelpCtx getHelpCtx()
Description copied from class: ServiceType
Get context help for this service type.
Overrides:
getHelpCtx in class ServiceType
Following copied from class: org.openide.ServiceType
Returns:
context help

debuggerTypes

public static Enumeration debuggerTypes()
Get all registered executors in the system's execution engine.
Returns:
enumeration of DebuggerTypes

find

public static DebuggerType find(Class clazz)
Find the debugger implemented as a given class, among the executors registered to the execution engine.

This should be used during (de-)serialization of the specific debugger for a data object: only store its class name and then try to find the debugger implemented by that class later.

Parameters:
clazz - the class of the debugger looked for
Returns:
the desired debugger or null if it does not exist

find

public static DebuggerType find(String name)
Find the debugger with requested name, among the executors registered to the execution engine.

This should be used during (de-)serialization of the specific debugger for a data object: only store its name and then try to find the debugger later.

Parameters:
name - (display) name of debugger to find
Returns:
the desired debugger or null if it does not exist

getDefault

public static DebuggerType getDefault()
Deprecated. There is probably not a single debugger type meaningfully applicable to all file types. If you explicitly want to invoke the plain Debugger interfaces, use DebuggerType.Default instead.

Get the default debugger for the system's execution engine.

You may actually want ExecSupport.getExecutor(org.openide.loaders.MultiDataObject.Entry).

Returns:
the default debugger


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.