jde.debugger
Class JDE

java.lang.Object
  |
  +--jde.debugger.JDE
All Implemented Interfaces:
Protocol

public class JDE
extends java.lang.Object
implements Protocol

JDE.java Created: Thu Feb 15 12:58:59 2001

Version:
$Revision: 1.8 $
Author:
Paul Kinnucan

Fields inherited from interface jde.debugger.Protocol
APP_IO, ATTACH_SHMEM, ATTACH_SOCKET, BR, BREAK, CANCEL_TRACE_CLASSES, CANCEL_TRACE_METHODS, CANCEL_TRACE_THREADS, CLEAR, CMD_NOK, CMD_OK, COMMAND_ERROR, COMMAND_RESULT, COMMANDS, CONNECTED_TO_VM, DEBUG, ERROR, EVALUATE, EVENT_BREAKPOINT_HIT, EVENT_CLASS_PREPARE, EVENT_CLASS_UNLOAD, EVENT_EXCEPTION, EVENT_METHOD_ENTRY, EVENT_METHOD_EXIT, EVENT_OTHER, EVENT_STEP_COMPLETED, EVENT_THREAD_DEATH, EVENT_THREAD_START, EVENT_VM_DEATH, EVENT_VM_DISCONNECT, EVENT_VM_START, EVENT_WATCHPOINT_HIT, EVENTS, EVENTSET, EXCEPTION, EXIT, FINISH, FRAMEWORK, GET_ARRAY, GET_LOADED_CLASSES, GET_LOCALS, GET_OBJECT, GET_OBJECT_MONITORS, GET_PATH_INFORMATION, GET_STRING, GET_THREAD, GET_THREADS, GUI, INTERRUPT, INVALID, JDE_BUG, JDE_INIT_DEBUG_SESSION, JDE_PIPE, KILL_THREAD, LAUNCH, LISTEN_SHMEM, LISTEN_SOCKET, MESSAGE, NONE, NOQUOTE, QUIT, QUOTE, REPORT_IDS_IN_USE, RESUME, RUN, SPEC_RESOLVED, STEP, SUSPEND, TRACE_CLASSES, TRACE_EXCEPTIONS, TRACE_METHODS, TRACE_THREADS, WARNING, WATCH
 
Method Summary
static void commandResult(java.lang.Integer cmdID, java.lang.String message, boolean success)
          Equivalent to calling commandResult(Integer, String, boolean, boolean) with the quote argument set to Protocol.NOQUOTE.
static void commandResult(java.lang.Integer cmdID, java.lang.String message, boolean success, boolean quote)
          Sends the result of executing a debugger command to Emacs.
static void debug(int flag, java.lang.String message)
          Send a debugging message to Emacs, for display in the *JDEbug* buffer.
static void setDebugFlags(int flags)
          To indicate which of the debugging flags should be set.
static void signal(java.lang.Integer procID, java.lang.String type, java.lang.String message)
          Equivalent to calling signal(Integer, String, String, boolean) with the quote argument set to false.
static void signal(java.lang.Integer procID, java.lang.String type, java.lang.String message, boolean quote)
          A method for sending more arbitrary information to Emacs.
static void signalException(java.lang.Throwable exc)
          A method for signaling JDEE that an exception occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDebugFlags

public static void setDebugFlags(int flags)
To indicate which of the debugging flags should be set. If a flag is set, it means that calls to JDE.debug() with that flag will actually be printed.
Parameters:
flags - an int value with a bitwise OR of the types of information that are desired.
See Also:
Protocol.NONE

debug

public static void debug(int flag,
                         java.lang.String message)
Send a debugging message to Emacs, for display in the *JDEbug* buffer. The message will only be printed if the flag that is passed in the first argument is set. The current time is prepended to the message string.
Parameters:
flag - an int value
message - a String value
See Also:
Protocol, setDebugFlags(int)

commandResult

public static void commandResult(java.lang.Integer cmdID,
                                 java.lang.String message,
                                 boolean success,
                                 boolean quote)
Sends the result of executing a debugger command to Emacs. Depending on wether the command was successful or not, different lisp code will be generated. If the quote argument is set (Protocol.QUOTE), double quotes will be added around the message string. The idea is that if the command result should be a Lisp string, you should set the quote argument to get the double quotes, and otherwise not.
Parameters:
cmdID - the ID of the command
message - a String value
success - indicates what to generate, Protocol.COMMAND_RESULT or Protocol.COMMAND_ERROR
quote - a boolean value

commandResult

public static void commandResult(java.lang.Integer cmdID,
                                 java.lang.String message,
                                 boolean success)
Equivalent to calling commandResult(Integer, String, boolean, boolean) with the quote argument set to Protocol.NOQUOTE.
Parameters:
cmdID - an Integer value
message - a String value
success - a boolean value

signal

public static void signal(java.lang.Integer procID,
                          java.lang.String type,
                          java.lang.String message,
                          boolean quote)
A method for sending more arbitrary information to Emacs. If the quote argument is set, double quotes will added around the message string.
Parameters:
procID - an Integer value
type - a String value indicating what Lisp command should be sent
message - a String value
quote - a boolean value

signalException

public static void signalException(java.lang.Throwable exc)
A method for signaling JDEE that an exception occured. The message displayed in Emacs will include the stack trace.

signal

public static void signal(java.lang.Integer procID,
                          java.lang.String type,
                          java.lang.String message)
Equivalent to calling signal(Integer, String, String, boolean) with the quote argument set to false.
Parameters:
procID - an Integer value
type - a String value
message - a String value