Eclipse Platform
2.1

org.eclipse.debug.core
Class DebugEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.eclipse.debug.core.DebugEvent
All Implemented Interfaces:
Serializable

public final class DebugEvent
extends EventObject

A debug event describes an event in a program being debugged or in a running process. Debug models and process implementations are required to generate debug events as specified by this class.

The following list defines the events generated for each debug model element. The getSource() method of a debug event returns the element associated with the event. Creation events are guaranteed to occur in a top down order - that is, parents are created before children. Termination events are guaranteed to occur in a bottom up order - that is, children before parents. However, termination events are not guaranteed for all elements that are created. That is, terminate events can be coalesced - a terminate event for a parent signals that all children have been terminated.

A debug model may define model specific events by specifying a debug event kind of MODEL_SPECIFIC. A model specific event is identified by the event source (i.e. by the debug model that generated the event). The detail of a model specific event is client defined. Note that model specific events are not understood by the debug platform, and are thus ignored.

The generic CHANGE event can be fired at any time by any element. Generally, a client of a debug model, such as as a UI, can get sufficient information to update by listening/responding to the other event kinds. However, if a debug model needs to inform clients of a change that is not specified by create/terminate/suspend/resume, the CHANGE event may be used. For example, generally, the only way a thread or any of its children can change state between a suspend and resume operation, is if the thread or owning debug target is terminated. However, if a debug model supports some other operation that would allow a debug element to change state while suspended, the debug model would fire a change event for that element. The valid detail codes for a change event are:

Clients may instantiate this class. Clients are not intended to subclass this class.

See Also:
Serialized Form

Field Summary
static int BREAKPOINT
          Breakpoint detail.
static int CHANGE
          Change event kind.
static int CLIENT_REQUEST
          Client request detail.
static int CONTENT
          Content change detail.
static int CREATE
          Create event kind.
static int EVALUATION
          Evaluation detail.
static int EVALUATION_IMPLICIT
          Evaluation detail.
static int MODEL_SPECIFIC
          Model specific event kind.
static int RESUME
          Resume event kind.
static int STATE
          State change detail.
static int STEP_END
          Step end detail.
static int STEP_INTO
          Step start detail.
static int STEP_OVER
          Step start detail.
static int STEP_RETURN
          Step start detail.
static int SUSPEND
          Suspend event kind.
static int TERMINATE
          Terminate event kind.
static int UNSPECIFIED
          Constant indicating that the kind or detail of a debug event is unspecified.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DebugEvent(Object eventSource, int kind)
          Constructs a new debug event of the given kind with a detail code of UNSPECIFIED.
DebugEvent(Object eventSource, int kind, int detail)
          Constructs a new debug event of the given kind with the given detail.
 
Method Summary
 Object getData()
          Returns this event's application defined data, or null if none
 int getDetail()
          Returns a constant describing extra detail about the event - either one of the detail constants defined by this class, possibly UNSPECIFIED, or a client defined detail if this is a model specific event.
 int getKind()
          Returns this event's kind - one of the kind constants defined by this class.
 boolean isEvaluation()
          Returns whether this event's detail indicates an evaluation.
 boolean isStepStart()
          Returns whether this event's detail indicates the beginning of a step event.
 void setData(Object data)
          Sets this event's application defined data.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESUME

public static final int RESUME
Resume event kind.

SUSPEND

public static final int SUSPEND
Suspend event kind.

CREATE

public static final int CREATE
Create event kind.

TERMINATE

public static final int TERMINATE
Terminate event kind.

CHANGE

public static final int CHANGE
Change event kind.

MODEL_SPECIFIC

public static final int MODEL_SPECIFIC
Model specific event kind. The detail codes for a model specific event are client defined.
Since:
2.1.2

STEP_INTO

public static final int STEP_INTO
Step start detail. Indicates a thread was resumed by a step into action.
Since:
2.0

STEP_OVER

public static final int STEP_OVER
Step start detail. Indicates a thread was resumed by a step over action.
Since:
2.0

STEP_RETURN

public static final int STEP_RETURN
Step start detail. Indicates a thread was resumed by a step return action.
Since:
2.0

STEP_END

public static final int STEP_END
Step end detail. Indicates a thread was suspended due to the completion of a step action.

BREAKPOINT

public static final int BREAKPOINT
Breakpoint detail. Indicates a thread was suspended by a breakpoint.

CLIENT_REQUEST

public static final int CLIENT_REQUEST
Client request detail. Indicates a thread was suspended due to a client request.

EVALUATION

public static final int EVALUATION
Evaluation detail. Indicates that a thread was resumed or suspended to perform an expression evaluation.
Since:
2.0

EVALUATION_IMPLICIT

public static final int EVALUATION_IMPLICIT
Evaluation detail. Indicates that a thread was resumed or suspended to perform an implicit expression evaluation. An implicit evaluation is an evaluation that is performed as an indirect result of a user action. Clients may use this detail event to decide whether or not to alert the user that an evaluation is taking place..
Since:
2.0

STATE

public static final int STATE
State change detail. Indicates the state of a single debug element has changed. Only valid for CHANGE events.
Since:
2.0

CONTENT

public static final int CONTENT
Content change detail. Indicates the content of a debug element (and potentially its children) has changed. Only valid for CHANGE events.
Since:
2.0

UNSPECIFIED

public static final int UNSPECIFIED
Constant indicating that the kind or detail of a debug event is unspecified.
Constructor Detail

DebugEvent

public DebugEvent(Object eventSource,
                  int kind)
Constructs a new debug event of the given kind with a detail code of UNSPECIFIED.
Parameters:
eventSource - the object associated with the event
kind - the kind of debug event (one of the kind constants defined by this class)

DebugEvent

public DebugEvent(Object eventSource,
                  int kind,
                  int detail)
Constructs a new debug event of the given kind with the given detail.
Parameters:
eventSource - the object associated with the event
kind - the kind of debug event (one of the kind constants defined by this class)
detail - extra information about the event (one of the detail constants defined by this class or a client defined detail if this is a model specific event)
Method Detail

getDetail

public int getDetail()
Returns a constant describing extra detail about the event - either one of the detail constants defined by this class, possibly UNSPECIFIED, or a client defined detail if this is a model specific event.
Returns:
the detail code

getKind

public int getKind()
Returns this event's kind - one of the kind constants defined by this class.
Returns:
the kind code

isStepStart

public boolean isStepStart()
Returns whether this event's detail indicates the beginning of a step event. This event's detail is one of STEP_INTO, STEP_OVER, or STEP_RETURN.
Returns:
whether this event's detail indicates the beginning of a step event.
Since:
2.0

isEvaluation

public boolean isEvaluation()
Returns whether this event's detail indicates an evaluation. This event's detail is one of EVALUATION, or EVALUATION_IMPLICIT.
Returns:
whether this event's detail indicates an evaluation.
Since:
2.0

setData

public void setData(Object data)
Sets this event's application defined data.
Parameters:
data - application defined data
Since:
2.1.2

getData

public Object getData()
Returns this event's application defined data, or null if none
Returns:
application defined data, or null if none
Since:
2.1.2

toString

public String toString()
Overrides:
toString in class EventObject
See Also:
Object.toString()

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.