JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.debug.core.breakpoints
Interface IJavaScriptBreakpointParticipant


public interface IJavaScriptBreakpointParticipant

Describes a participant that will be consulted during the suspending / resuming of an IJavaScriptBreakpoint.

Every participant has a distinct vote to resume or suspend a breakpoint.

Since:
1.0
Restriction:
This interface is not intended to be extended by clients.

Field Summary
static int DONT_CARE
          Return code indicating that this listener should not be considered in a vote to suspend a thread or install a breakpoint.
static int DONT_SUSPEND
          Return code in response to a "breakpoint hit" notification, indicating a vote to not suspend (i.e. resume) the associated thread.
static int SUSPEND
          Return code in response to a "breakpoint hit" notification, indicating a vote to suspend the associated thread.
 
Method Summary
 int breakpointHit(IJavaScriptThread thread, IJavaScriptBreakpoint breakpoint)
          Notification that the given breakpoint has been hit in the specified thread.
 int scriptLoaded(IJavaScriptThread thread, ScriptReference script, IJavaScriptBreakpoint breakpoint)
          Notification that the given ScriptReference has been loaded in the specified thread.
 

Field Detail

SUSPEND

static final int SUSPEND
Return code in response to a "breakpoint hit" notification, indicating a vote to suspend the associated thread.

See Also:
Constant Field Values

DONT_SUSPEND

static final int DONT_SUSPEND
Return code in response to a "breakpoint hit" notification, indicating a vote to not suspend (i.e. resume) the associated thread.

See Also:
Constant Field Values

DONT_CARE

static final int DONT_CARE
Return code indicating that this listener should not be considered in a vote to suspend a thread or install a breakpoint.

See Also:
Constant Field Values
Method Detail

breakpointHit

int breakpointHit(IJavaScriptThread thread,
                  IJavaScriptBreakpoint breakpoint)
Notification that the given breakpoint has been hit in the specified thread. Allows this listener to vote to determine if the given thread should be suspended in response to the breakpoint. If at least one listener votes to SUSPEND, the thread will suspend. If there are no votes to suspend the thread, there must be at least one DONT_SUSPEND vote to avoid the suspension (resume). If all listeners vote DONT_CARE, the thread will suspend by default.

The thread the breakpoint has been encountered in is now suspended. Listeners may query thread state and perform evaluations. All subsequent breakpoints in this thread will be ignored until voting has completed.

Parameters:
thread - the JavaScript thread
breakpoint - the IJavaScriptBreakpoint
Returns:
whether the thread should suspend or whether this listener doesn't care - one of SUSPEND, DONT_SUSPEND, or DONT_CARE

scriptLoaded

int scriptLoaded(IJavaScriptThread thread,
                 ScriptReference script,
                 IJavaScriptBreakpoint breakpoint)
Notification that the given ScriptReference has been loaded in the specified thread. Allows this listener to vote to determine if the given thread should be suspended in response to the breakpoint. If at least one listener votes to SUSPEND, the thread will suspend. If there are no votes to suspend the thread, there must be at least one DONT_SUSPEND vote to avoid the suspension (resume). If all listeners vote DONT_CARE, the thread will suspend by default.

The thread the breakpoint has been encountered in is now suspended. Listeners may query thread state and perform evaluations. All subsequent breakpoints in this thread will be ignored until voting has completed.

Parameters:
thread - the JavaScript thread
script - the ScriptReference that has been loaded
breakpoint - the IJavaScriptBreakpoint
Returns:
whether the thread should suspend or whether this listener doesn't care - one of SUSPEND, DONT_SUSPEND, or DONT_CARE

JavaScript Development Tools
Release 3.2

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