org.eclipse.ease.ui.view

## Class ScriptShell

- java.lang.Object
- - org.eclipse.core.commands.common.EventManager
  - - org.eclipse.ui.part.WorkbenchPart
    - - org.eclipse.ui.part.ViewPart
      - - org.eclipse.ease.ui.view.ScriptShell

All Implemented Interfaces:
  EventListener, IAdaptable, IExecutableExtension, IExecutionListener, IScriptEngineProvider, IPropertyChangeListener, IPersistable, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

    public class ScriptShell
    extends ViewPart
    implements IPropertyChangeListener, IScriptEngineProvider, IExecutionListener

The JavaScript shell allows to interactively execute JavaScript code.

### Field Summary

Fields
`static String` `VIEW_ID`

### Fields inherited from interface org.eclipse.ease.IExecutionListener

`ENGINE_END, ENGINE_START, SCRIPT_END, SCRIPT_INJECTION_END, SCRIPT_INJECTION_START, SCRIPT_START`

### Fields inherited from interface org.eclipse.ui.IWorkbenchPart

`PROP_TITLE`

### Constructor Summary

Constructors
Constructor and Description
`ScriptShell()` Default constructor.

### Method Summary

Methods
`void` `clearOutput()` Clear the output text.
`void` `createPartControl(Composite parent)`
`void` `dispose()`
`StyledText` `getOutput()`
`IScriptEngine` `getScriptEngine()`
`String` `getSelectedText()` Get the text selected in the output pane.
`void` `init(IViewSite site, IMemento memento)`
`void` `notify(IScriptEngine engine, Script script, int status)` Notifies the listeners when script execution started/ended or when the engine itself is started/ended.
`void` `propertyChange(PropertyChangeEvent event)`
`void` `runStartupCommands()`
`void` `saveState(IMemento memento)`
`void` `setEngine(String id)`
`void` `setFocus()`
`void` `setPrintLock(boolean lock)` Set/unset the print lock feature.
`void` `setScrollLock(boolean lock)` Set/unset the scroll lock feature.
`void` `stopScriptEngine()`
`void` `toggleDropinsPane()`

### Methods inherited from class org.eclipse.ui.part.ViewPart

`getViewSite, init, setInitializationData`

### Methods inherited from class org.eclipse.ui.part.WorkbenchPart

`addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.ui.IWorkbenchPart

`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Field Detail

#### VIEW_ID

    public static final String VIEW_ID

See Also:
  Constant Field Values

### Constructor Detail

#### ScriptShell

    public ScriptShell()

Default constructor.

### Method Detail

#### init

    public final void init(IViewSite site,
            IMemento memento)
                    throws PartInitException

Specified by:
  `init` in interface `IViewPart`
Overrides:
  `init` in class `ViewPart`
Throws:
  `PartInitException`

#### saveState

    public final void saveState(IMemento memento)

Specified by:
  `saveState` in interface `IPersistable`
Specified by:
  `saveState` in interface `IViewPart`
Overrides:
  `saveState` in class `ViewPart`

#### createPartControl

    public final void createPartControl(Composite parent)

Specified by:
  `createPartControl` in interface `IWorkbenchPart`
Specified by:
  `createPartControl` in class `WorkbenchPart`

#### runStartupCommands

    public void runStartupCommands()

#### dispose

    public final void dispose()

Specified by:
  `dispose` in interface `IWorkbenchPart`
Overrides:
  `dispose` in class `WorkbenchPart`

#### setFocus

    public final void setFocus()

Specified by:
  `setFocus` in interface `IWorkbenchPart`
Specified by:
  `setFocus` in class `WorkbenchPart`

#### clearOutput

    public final void clearOutput()

Clear the output text.

#### setScrollLock

    public final void setScrollLock(boolean lock)

Set/unset the scroll lock feature.

Parameters:
  `lock` - true when auto scrolling shall be locked

#### setPrintLock

    public final void setPrintLock(boolean lock)

Set/unset the print lock feature. When

Parameters:
  `lock` - true when printing shall be disabled

#### getSelectedText

    public final String getSelectedText()

Get the text selected in the output pane. if no text is selected, the whole content will be returned.

Returns:
  selected text of output pane

#### toggleDropinsPane

    public final void toggleDropinsPane()

#### propertyChange

    public final void propertyChange(PropertyChangeEvent event)

Specified by:
  `propertyChange` in interface `IPropertyChangeListener`

#### getOutput

    public StyledText getOutput()

#### stopScriptEngine

    public void stopScriptEngine()

#### getScriptEngine

    public IScriptEngine getScriptEngine()

Specified by:
  `getScriptEngine` in interface `IScriptEngineProvider`

#### notify

    public void notify(IScriptEngine engine,
              Script script,
              int status)

Description copied from interface: `IExecutionListener`
Notifies the listeners when script execution started/ended or when the engine itself is started/ended.

Specified by:
  `notify` in interface `IExecutionListener`
Parameters:
  `engine` - Script Engine
  `script` - Script or `null`
  `status` - Event Status

#### setEngine

    public final void setEngine(String id)