JavaScript Development Tools
Release 3.2

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

All Known Subinterfaces:
IJavaScriptFunctionBreakpoint, IJavaScriptLineBreakpoint, IJavaScriptLoadBreakpoint

public interface IJavaScriptBreakpoint

General JavaScript breakpoint

Since:
1.0

Field Summary
static String ELEMENT_HANDLE
          JSDT member handle
static String HIT_COUNT
          The hit count set in the breakpoint
static String SCRIPT_PATH
          Breakpoint attribute for the path of the script
static String SUSPEND_POLICY
          The suspend policy for the breakpoint
static int SUSPEND_TARGET
          Suspend policy for suspending the current target
static int SUSPEND_THREAD
          Suspend policy for suspending the current thread of execution
static String TYPE_NAME
          The type name within the script
 
Method Summary
 int getHitCount()
          Returns the hit count set for this breakpoint or -1 if no hit count has been set.
 String getJavaScriptElementHandle()
          Returns the IJavaScriptElement handle for the member this breakpoint is set on.
 String getScriptPath()
          Returns the path of the script as it was set when the breakpoint was created.
 int getSuspendPolicy()
          Returns the suspend policy for this breakpoint, default suspend policy is to suspend the thread
 String getTypeName()
          Returns the type name that the breakpoint is set within.
 boolean isInstalled()
          Returns if the breakpoint is currently installed or not.
 void setHitCount(int count)
          Sets the given hit count for the breakpoint, throws an IllegalArgumentException if the given count is less than 1.
 void setJavaScriptElementHandle(String handle)
          Allows the IJavaScriptElement handle to be set for this breakpoint.
 void setSuspendPolicy(int policy)
          Sets the suspend policy for this breakpoint.
 

Field Detail

SUSPEND_POLICY

static final String SUSPEND_POLICY
The suspend policy for the breakpoint

See Also:
Constant Field Values

TYPE_NAME

static final String TYPE_NAME
The type name within the script

See Also:
Constant Field Values

SCRIPT_PATH

static final String SCRIPT_PATH
Breakpoint attribute for the path of the script

See Also:
Constant Field Values

HIT_COUNT

static final String HIT_COUNT
The hit count set in the breakpoint

See Also:
Constant Field Values

SUSPEND_THREAD

static final int SUSPEND_THREAD
Suspend policy for suspending the current thread of execution

See Also:
Constant Field Values

SUSPEND_TARGET

static final int SUSPEND_TARGET
Suspend policy for suspending the current target

See Also:
Constant Field Values

ELEMENT_HANDLE

static final String ELEMENT_HANDLE
JSDT member handle

See Also:
Constant Field Values
Method Detail

getScriptPath

String getScriptPath()
                     throws CoreException
Returns the path of the script as it was set when the breakpoint was created.

This method cannot return null

Returns:
the path of the script this breakpoint was created on never null
Throws:
CoreException - if the breakpoint cannot be accessed

getTypeName

String getTypeName()
                   throws CoreException
Returns the type name that the breakpoint is set within.

This method can return null when the breakpoint is set on a top-level type i.e. set on the root source

Returns:
the type name or null
Throws:
CoreException - if the breakpoint cannot be accessed

getHitCount

int getHitCount()
                throws CoreException
Returns the hit count set for this breakpoint or -1 if no hit count has been set.

Returns:
the hit count
Throws:
CoreException - if the breakpoint cannot be accessed

setHitCount

void setHitCount(int count)
                 throws CoreException,
                        IllegalArgumentException
Sets the given hit count for the breakpoint, throws an IllegalArgumentException if the given count is less than 1.

Parameters:
count - the count to set, must be > 0
Throws:
CoreException
IllegalArgumentException - if count < 1

getSuspendPolicy

int getSuspendPolicy()
                     throws CoreException
Returns the suspend policy for this breakpoint, default suspend policy is to suspend the thread

Returns:
the suspend policy
Throws:
CoreException - if the breakpoint cannot be accessed
See Also:
SUSPEND_THREAD, SUSPEND_TARGET

setSuspendPolicy

void setSuspendPolicy(int policy)
                      throws CoreException
Sets the suspend policy for this breakpoint. Anything other than SUSPEND_THREAD or SUSPEND_TARGET will be ignored.

Parameters:
policy - the policy to set
Throws:
CoreException - if the breakpoint cannot be accessed
See Also:
SUSPEND_THREAD, SUSPEND_TARGET

getJavaScriptElementHandle

String getJavaScriptElementHandle()
                                  throws CoreException
Returns the IJavaScriptElement handle for the member this breakpoint is set on.

This method can return null if no element handle has been set

Returns:
the IJavaScriptElement handle or null
Throws:
CoreException - if the breakpoint cannot be accessed

setJavaScriptElementHandle

void setJavaScriptElementHandle(String handle)
                                throws CoreException
Allows the IJavaScriptElement handle to be set for this breakpoint.

Parameters:
handle - the new handle to set, null will remove any existing handle
Throws:
CoreException - if the breakpoint cannot be accessed

isInstalled

boolean isInstalled()
                    throws CoreException
Returns if the breakpoint is currently installed or not.

Returns:
true if the breakpoint is installed false otherwise
Throws:
CoreException - if the breakpoint cannot be accessed

JavaScript Development Tools
Release 3.2

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