Methods in the launch module ease writing scripts to perform complicated launch set-up and control. The key method is launch(String, String).
A simple example of its use is:
loadModule("/System/Launch") launch("Client", "debug")where "Client" is the name of a launch configuration in the workbench and "debug" is the launch mode to use.
More examples of using the launch method are available in JavaScript Snippets.
Method | Description |
---|---|
getLaunchConfiguration() | Return the launch configuration given by name parameter. |
getLaunchConfigurationNames() | Returns an array of all the Launch Configuration Names known to the Launch Manager. |
getLaunchConfigurations() | Returns an array of all the Launch Configurations known to the Launch Manager. |
getLaunchManager() | Obtain the platform launch manager. |
launch() | Launch the configuration given by name, or an ILaunchConfiguration, and return the ILaunch for further processing. |
launchUI() | Launch the configuration given by name, or an ILaunchConfiguration, in the UI thread. |
ILaunchConfiguration getLaunchConfiguration(String name)
Return the launch configuration given by name parameter. The launch configuration can be edited or otherwise operated on.
the named launch configuration
String getLaunchConfigurationNames()
Returns an array of all the Launch Configuration Names known to the Launch Manager. These names can be used as the argument to the getLaunchConfiguration(), launch() and launchUI() methods.
array of launch configuration names.
ILaunchConfiguration getLaunchConfigurations()
Returns an array of all the Launch Configurations known to the Launch Manager. These can be used as the argument to launch() and launchUI() methods.
array of launch configurations
ILaunchManager getLaunchManager()
Obtain the platform launch manager. This allows access to the Eclipse debug core launch manager, allowing control over all non-UI aspects of launches. The most valuable of these should be wrapped for ideal script usage and made available in the module itself.
the launch manager
ILaunch launch(Object launchConfiguration, [String mode])
Launch the configuration given by name, or an ILaunchConfiguration, and return the ILaunch for further processing.
This is the way to launch a configuration within a script which is itself launched. Consider using launchUI() if a full UI style launch is required, for example when invoked from the interactive console.
the resulting launch
void launchUI(Object launchConfiguration, [String mode])
Launch the configuration given by name, or an ILaunchConfiguration, in the UI thread. This method respects the workspace settings for things like building before launching.
This method, unlike launch(), does not return the ILaunch because it is delegated to run via the UI thread and perform UI tasks before the launch (such as prompting the user).