|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.EventNotifier<DebugListener>
edu.rice.cs.drjava.model.debug.DebugEventNotifier
public class DebugEventNotifier
Keeps track of all listeners to a Debugger, and has the ability to notify them of some event.
This class has a specific role of managing DebugListeners. Other classes with similar names use similar code to perform the same function for other interfaces, e.g. InteractionsEventNotifier and GlobalEventNotifier. These classes implement the appropriate interface definition so that they can be used transparently as composite packaging for a particular listener interface.
Components which might otherwise manage their own list of listeners use EventNotifiers instead to simplify their internal implementation. Notifiers should therefore be considered a private implementation detail of the components, and should not be used directly outside of the "host" component.
All methods in this class must use the synchronization methods provided by ReaderWriterLock. This ensures that multiple notifications (reads) can occur simultaneously, but only one thread can be adding or removing listeners (writing) at a time, and no reads can occur during a write.
No methods on this class should be synchronized using traditional Java synchronization!
Field Summary |
---|
Fields inherited from class edu.rice.cs.drjava.model.EventNotifier |
---|
_listeners, _lock |
Constructor Summary | |
---|---|
DebugEventNotifier()
|
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 |
regionAdded(Breakpoint bp)
Called when a breakpoint is set in a document. |
void |
regionChanged(Breakpoint bp)
Called when a breakpoint is changed during execution. |
void |
regionRemoved(Breakpoint bp)
Called when a breakpoint is removed from a document. |
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 class edu.rice.cs.drjava.model.EventNotifier |
---|
addListener, removeAllListeners, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DebugEventNotifier()
Method Detail |
---|
public void debuggerStarted()
debuggerStarted
in interface DebugListener
public void debuggerShutdown()
debuggerShutdown
in interface DebugListener
public void threadLocationUpdated(OpenDefinitionsDocument doc, int lineNumber, boolean shouldHighlight)
threadLocationUpdated
in interface DebugListener
doc
- Document to displaylineNumber
- Line to display or highlightshouldHighlight
- true iff the line should be highlighted.public void regionAdded(Breakpoint bp)
regionAdded
in interface RegionManagerListener<Breakpoint>
bp
- the breakpointpublic void breakpointReached(Breakpoint bp)
breakpointReached
in interface DebugListener
bp
- the breakpointpublic void regionChanged(Breakpoint bp)
regionChanged
in interface RegionManagerListener<Breakpoint>
bp
- the breakpointpublic void watchSet(DebugWatchData w)
watchSet
in interface DebugListener
w
- the watchpublic void watchRemoved(DebugWatchData w)
watchRemoved
in interface DebugListener
w
- the watchpublic void regionRemoved(Breakpoint bp)
regionRemoved
in interface RegionManagerListener<Breakpoint>
bp
- the breakpointpublic void stepRequested()
stepRequested
in interface DebugListener
public void currThreadSuspended()
currThreadSuspended
in interface DebugListener
public void currThreadResumed()
currThreadResumed
in interface DebugListener
public void threadStarted()
threadStarted
in interface DebugListener
public void currThreadDied()
currThreadDied
in interface DebugListener
public void nonCurrThreadDied()
nonCurrThreadDied
in interface DebugListener
public void currThreadSet(DebugThreadData thread)
currThreadSet
in interface DebugListener
thread
- the thread that was set as current
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |