org.eclipse.wst.jsdt.core

## Interface IJavaScriptModelStatus

    public interface IJavaScriptModelStatus

Represents the outcome of an JavaScript model operation. Status objects are used inside `JavaScriptModelException` objects to indicate what went wrong.

JavaScript model status object are distinguished by their plug-in id: `getPlugin` returns `"org.eclipse.wst.jsdt.core"`. `getCode` returns one of the status codes declared in `IJavaScriptModelStatusConstants`.

A JavaScript model status may also carry additional information (that is, in addition to the information defined in `IStatus`):

- elements - optional handles to JavaScript elements associated with the failure
- string - optional string associated with the failure

This interface is not intended to be implemented by clients.

See Also:
  `org.eclipse.core.runtime.IStatus`, `Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.`

### Method Summary

All Methods Instance Methods Abstract Methods
`IJavaScriptElement[]` `getElements()` Returns any JavaScript elements associated with the failure (see specification of the status code), or an empty array if no elements are related to this particular status code.
`IPath` `getPath()` Returns the path associated with the failure (see specification of the status code), or `null` if the failure is not one of `DEVICE_PATH`, `INVALID_PATH`, `PATH_OUTSIDE_PROJECT`, or `RELATIVE_PATH`.
`boolean` `isDoesNotExist()` Returns whether this status indicates that a JavaScript model element does not exist.

### Method Detail

#### getElements

    IJavaScriptElement[] getElements()

Returns any JavaScript elements associated with the failure (see specification of the status code), or an empty array if no elements are related to this particular status code.

Returns:
  the list of JavaScript element culprits
See Also:
  `IJavaScriptModelStatusConstants`

#### getPath

    IPath getPath()

Returns the path associated with the failure (see specification of the status code), or `null` if the failure is not one of `DEVICE_PATH`, `INVALID_PATH`, `PATH_OUTSIDE_PROJECT`, or `RELATIVE_PATH`.

Returns:
  the path that caused the failure, or `null` if none
See Also:
  `IJavaScriptModelStatusConstants.DEVICE_PATH`, `IJavaScriptModelStatusConstants.INVALID_PATH`, `IJavaScriptModelStatusConstants.PATH_OUTSIDE_PROJECT`, `IJavaScriptModelStatusConstants.RELATIVE_PATH`

#### isDoesNotExist

    boolean isDoesNotExist()

Returns whether this status indicates that a JavaScript model element does not exist. This convenience method is equivalent to `getCode() == IJavaScriptModelStatusConstants.ELEMENT_DOES_NOT_EXIST`.

Returns:
  `true` if the status code indicates that a JavaScript model element does not exist
See Also:
  `IJavaScriptModelStatusConstants.ELEMENT_DOES_NOT_EXIST`