org.eclipse.ease.service

## Interface IScriptService

All Known Implementing Classes:
  ScriptService

    public interface IScriptService

Global service to create script engines and to query configuration data from the scripting extensions. To get the service instance use

     final IScriptService scriptService = PlatformUI.getWorkbench().getService(IScriptService.class);

### Field Summary

Fields
`static boolean` `TRACE_SCRIPT_SERVICE` Trace enablement for the script service.

### Method Summary

All Methods Instance Methods Abstract Methods
`java.util.Map<java.lang.String,ModuleCategoryDefinition>` `getAvailableModuleCategories()` Get a map of available module categories.
`java.util.Collection<ModuleDefinition>` `getAvailableModules()` Get a map of available modules.
`java.util.Map<java.lang.String,ScriptType>` `getAvailableScriptTypes()` Get a map of available script tpye.
`EngineDescription` `getEngine(java.lang.String scriptType)` Get default engine for a given script type.
`EngineDescription` `getEngineByID(java.lang.String engineID)` Get a dedicated engine description.
`java.util.Collection<EngineDescription>` `getEngines()` Get available engine descriptions.
`java.util.List<EngineDescription>` `getEngines(java.lang.String scriptType)` Get available engine descriptions for a given script type.
`java.util.Collection<IScriptEngineLaunchExtension>` `getLaunchExtensions(EngineDescription engineDescription)` Get Launch extensions for a dedicated script engine.
`ModuleDefinition` `getModuleDefinition(java.lang.String moduleId)` Get the definition of the module with given ID.
`ScriptType` `getScriptType(java.lang.String location)` Get the script type for a given resource location.

### Field Detail

#### TRACE_SCRIPT_SERVICE

    static final boolean TRACE_SCRIPT_SERVICE

Trace enablement for the script service.

### Method Detail

#### getEngineByID

    EngineDescription getEngineByID(java.lang.String engineID)

Get a dedicated engine description. Allows to get an engine description for a dedicated engine identifier.

Parameters:
  `engineID` - engine identifier
Returns:
  script engine description or `null`

#### getEngines

    java.util.Collection<EngineDescription> getEngines()

Get available engine descriptions.

Returns:
  available descriptions or empty collection

#### getEngines

    java.util.List<EngineDescription> getEngines(java.lang.String scriptType)

Get available engine descriptions for a given script type. The resulting list is sorted by priority. Index 0 contains the engine with the highest priority.

Parameters:
  `scriptType` - type of script
Returns:
  available descriptions or empty collection

#### getEngine

    EngineDescription getEngine(java.lang.String scriptType)

Get default engine for a given script type. While there might exist multiple engines, the returned one has the highest priority.

Parameters:
  `scriptType` - type of script
Returns:
  engine description or `null`

#### getAvailableModules

    java.util.Collection<ModuleDefinition> getAvailableModules()

Get a map of available modules. Keys contain the full module name, values contain its descriptor.

Returns:
  available modules or empty map

#### getAvailableModuleCategories

    java.util.Map<java.lang.String,ModuleCategoryDefinition> getAvailableModuleCategories()

Get a map of available module categories. Keys contain the category id, values contain its descriptor.

Returns:
  available modules or empty map

#### getAvailableScriptTypes

    java.util.Map<java.lang.String,ScriptType> getAvailableScriptTypes()

Get a map of available script tpye. Keys contain the type name, values contain its descriptor.

Returns:
  available script types or empty map

#### getLaunchExtensions

    java.util.Collection<IScriptEngineLaunchExtension> getLaunchExtensions(EngineDescription engineDescription)

Get Launch extensions for a dedicated script engine.

Parameters:
  `engineDescription` - engine description for further filtering
Returns:
  launch extensions or empty collection

#### getScriptType

    ScriptType getScriptType(java.lang.String location)

Get the script type for a given resource location.

Parameters:
  `location` - resource location
Returns:
  script type associated with file extension or `null`

#### getModuleDefinition

    ModuleDefinition getModuleDefinition(java.lang.String moduleId)

Get the definition of the module with given ID.

Parameters:
  `moduleId` - id to look for
Returns:
  module definition