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

## Class JavaScriptDebugModel

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

    public class JavaScriptDebugModel
    extends java.lang.Object

The JavaScript debug model

Since:
  1.0

### Field Summary

Fields
`static java.lang.String` `MODEL_ID` Debug model identifier.

### Constructor Summary

Constructors
Constructor and Description
`JavaScriptDebugModel()`

### Method Summary

All Methods Static Methods Concrete Methods
`static IJavaScriptFunctionBreakpoint` `createFunctionBreakpoint(IResource resource, java.lang.String name, java.lang.String signature, int charstart, int charend, java.util.Map attributes, boolean register)` Creates a new `IJavaScriptFunctionBreakpoint`
`static IJavaScriptLineBreakpoint` `createLineBreakpoint(IResource resource, int linenumber, int charstart, int charend, java.util.Map attributes, boolean register)` Creates a new `IJavaScriptLineBreakpoint`
`static IJavaScriptLoadBreakpoint` `createScriptLoadBreakpoint(IResource resource, int charstart, int charend, java.util.Map attributes, boolean register)` Creates a new `IJavaScriptLoadBreakpoint`
`static java.lang.String` `numberToString(java.lang.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 java.lang.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,
                                                                 java.util.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,
                                                                       java.util.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,
                                                                         java.lang.String name,
                                                                         java.lang.String signature,
                                                                         int charstart,
                                                                         int charend,
                                                                         java.util.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 java.lang.String numberToString(java.lang.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