edu.rice.cs.drjava.model.debug
Interface DebugListener

All Superinterfaces:
RegionManagerListener<Breakpoint>
All Known Implementing Classes:
DebugEventNotifier, DebugPanel.DebugPanelListener, DebugTestCase.BreakpointTestListener, DebugTestCase.DebugStartAndStopListener, DebugTestCase.DebugTestListener, DebugTestCase.StepTestListener, MainFrame.UIDebugListener

public interface DebugListener
extends RegionManagerListener<Breakpoint>

Any class which wants to listen to events fired by the Debugger should implement this interface and use Debugger's addDebugListener() method.

Version:
$Id: DebugListener.java 5175 2010-01-20 08:46:32Z mgricken $

Method Summary
 void breakpointReached(Breakpoint bp)
          Called when a breakpoint is reached during execution.
 void currThreadDied()
          Called when the current thread dies.
 void currThreadResumed()
          Called when the current thread is resumed.
 void currThreadSet(DebugThreadData thread)
          Called when the current (selected) thread is set in the debugger.
 void currThreadSuspended()
          Called when the current thread is suspended.
 void debuggerShutdown()
          Called when debugger mode has been disabled.
 void debuggerStarted()
          Called when debugger mode has been enabled.
 void nonCurrThreadDied()
          Called when any thread other than the current thread dies.
 void stepRequested()
          Called when a step is requested on the current thread.
 void threadLocationUpdated(OpenDefinitionsDocument doc, int lineNumber, boolean shouldHighlight)
          Called when the given line is reached by the current thread in the debugger, to request that the line be displayed.
 void threadStarted()
          Called when a thread starts.
 void watchRemoved(DebugWatchData w)
          Called when a watch is removed.
 void watchSet(DebugWatchData w)
          Called when a watch is set.
 
Methods inherited from interface edu.rice.cs.drjava.model.RegionManagerListener
regionAdded, regionChanged, regionRemoved
 

Method Detail

debuggerStarted

void debuggerStarted()
Called when debugger mode has been enabled. Must be executed in event thread.


debuggerShutdown

void debuggerShutdown()
Called when debugger mode has been disabled. Must be executed in event thread.


threadLocationUpdated

void threadLocationUpdated(OpenDefinitionsDocument doc,
                           int lineNumber,
                           boolean shouldHighlight)
Called when the given line is reached by the current thread in the debugger, to request that the line be displayed. Must be executed only in the event thread.

Parameters:
doc - Document to display
lineNumber - Line to display or highlight
shouldHighlight - true iff the line should be highlighted.

breakpointReached

void breakpointReached(Breakpoint bp)
Called when a breakpoint is reached during execution.

Parameters:
bp - the breakpoint

watchSet

void watchSet(DebugWatchData w)
Called when a watch is set. Must be executed in event thread.

Parameters:
w - the watch

watchRemoved

void watchRemoved(DebugWatchData w)
Called when a watch is removed. Must be executed in event thread.

Parameters:
w - the watch

stepRequested

void stepRequested()
Called when a step is requested on the current thread. Must be executed in event thread.


currThreadSuspended

void currThreadSuspended()
Called when the current thread is suspended.


currThreadResumed

void currThreadResumed()
Called when the current thread is resumed. Must be executed in event thread.


threadStarted

void threadStarted()
Called when a thread starts. Must be executed in event thread.


currThreadDied

void currThreadDied()
Called when the current thread dies. Must be executed in event thread.


nonCurrThreadDied

void nonCurrThreadDied()
Called when any thread other than the current thread dies. Must be executed in event thread.


currThreadSet

void currThreadSet(DebugThreadData thread)
Called when the current (selected) thread is set in the debugger.

Parameters:
thread - the thread that was set as current