Eclipse Platform
2.0

org.eclipse.debug.ui
Interface ILaunchShortcut


public interface ILaunchShortcut

A launch shortcut is capable of launching a selection or active editor in the workbench. The delegate is responsible for interpretting the selection or active editor (if it applies), and launching an application. This may require creating a new launch configuration with default values, or re-using an existing launch configuration.

A launch shortcut is defined as an extension of type org.eclipse.debug.ui.launchShortcuts. A shortcut specifies the perspectives in which is should be available from the "Run/Debug" cascade menus.

A launch shortcut extension is defined in plugin.xml. Following is an example definition of a launch shortcut extension.

 <extension point="org.eclipse.debug.ui.launchShortcuts">
   <launchShortcut
      id="com.example.ExampleLaunchShortcut"
      class="com.example.ExampleLaunchShortcutClass"
 		label="Example Label"
 		icon="\icons\exampleshortcut.gif"
 		modes="run, debug">
 		<perspective id="com.example.perspectiveId1"/>
      <perspective id="com.example.perspectiveId2"/>
   </launchShortcut>
 </extension>
 
The attributes are specified as follows:

Since:
2.0

Method Summary
 void launch(IEditorPart editor, String mode)
          Locates a launchable entity in the given active editor, and launches an application in the specified mode.
 void launch(ISelection selection, String mode)
          Locates a launchable entity in the given selection and launches an application in the specified mode.
 

Method Detail

launch

public void launch(ISelection selection,
                   String mode)
Locates a launchable entity in the given selection and launches an application in the specified mode. This launch configuration shortcut is responsible for progress reporting as well as error handling, in the event that a launchable entity cannot be found, or launching fails.

Parameters:
selection - workbench selection
mode - one of the launch modes defined by the launch manager
See Also:
ILaunchManager

launch

public void launch(IEditorPart editor,
                   String mode)
Locates a launchable entity in the given active editor, and launches an application in the specified mode. This launch configuration shortcut is responsible for progress reporting as well as error handling, in the event that a launchable entity cannot be found, or launching fails.

Parameters:
editor - the active editor in the workbench
mode - one of the launch modes defined by the launch manager
See Also:
ILaunchManager

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.