JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.debug.core.model
Class JavaScriptDebugModel

java.lang.Object
  extended by org.eclipse.wst.jsdt.debug.core.model.JavaScriptDebugModel

public class JavaScriptDebugModel
extends Object

The JavaScript debug model

Since:
1.0

Field Summary
static String MODEL_ID
          Debug model identifier.
 
Constructor Summary
JavaScriptDebugModel()
           
 
Method Summary
static IJavaScriptFunctionBreakpoint createFunctionBreakpoint(IResource resource, String name, String signature, int charstart, int charend, Map attributes, boolean register)
          Creates a new IJavaScriptFunctionBreakpoint
static IJavaScriptLineBreakpoint createLineBreakpoint(IResource resource, int linenumber, int charstart, int charend, Map attributes, boolean register)
          Creates a new IJavaScriptLineBreakpoint
static IJavaScriptLoadBreakpoint createScriptLoadBreakpoint(IResource resource, int charstart, int charend, Map attributes, boolean register)
          Creates a new IJavaScriptLoadBreakpoint
static String numberToString(Number n)
          Converts the given double value to a String removing the trailing .0 in the event the precision is 1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_ID

public static final String MODEL_ID
Debug model identifier.

Value is: org.eclipse.wst.jsdt.debug.model

See Also:
Constant Field Values
Constructor Detail

JavaScriptDebugModel

public JavaScriptDebugModel()
Method Detail

createLineBreakpoint

public static IJavaScriptLineBreakpoint createLineBreakpoint(IResource resource,
                                                             int linenumber,
                                                             int charstart,
                                                             int charend,
                                                             Map attributes,
                                                             boolean register)
                                                      throws DebugException
Creates a new IJavaScriptLineBreakpoint

Parameters:
resource - the resource to create the breakpoint on
linenumber - the line number to place the breakpoint on
charstart - the char start or -1
charend - the char end or -1
attributes - the optional map of attributes or null
register - if the breakpoint should be immediately registered or not
Returns:
a new IJavaScriptLineBreakpoint
Throws:
DebugException - if breakpoint creation failed

createScriptLoadBreakpoint

public static IJavaScriptLoadBreakpoint createScriptLoadBreakpoint(IResource resource,
                                                                   int charstart,
                                                                   int charend,
                                                                   Map attributes,
                                                                   boolean register)
                                                            throws DebugException
Creates a new IJavaScriptLoadBreakpoint

Parameters:
resource - the resource to associate the breakpoint with, or null
charstart - the char start or -1
charend - the char end or -1
attributes - the optional map of attributes or null
register - if the breakpoint should be immediately registered or not
Returns:
a new IJavaScriptLoadBreakpoint
Throws:
DebugException - if breakpoint creation fails

createFunctionBreakpoint

public static IJavaScriptFunctionBreakpoint createFunctionBreakpoint(IResource resource,
                                                                     String name,
                                                                     String signature,
                                                                     int charstart,
                                                                     int charend,
                                                                     Map attributes,
                                                                     boolean register)
                                                              throws DebugException
Creates a new IJavaScriptFunctionBreakpoint

Parameters:
resource - the resource to create the breakpoint on
name - the name of the function
signature - the signature of the function
charstart - the char start of the function or -1
charend - the char end of the function or -1
attributes - an optional mapping of attributes or null
register - if the breakpoint should immediately be registered or not
Returns:
a new IJavaScriptFunctionBreakpoint
Throws:
DebugException - if breakpoint creation fails

numberToString

public static String numberToString(Number n)
Converts the given double value to a String removing the trailing .0 in the event the precision is 1

Parameters:
n - the number to convert
Returns:
the String value of the number with trailing .0 removed iff the precision is 1

JavaScript Development Tools
Release 3.2

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