|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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:
id
specifies a unique identifier for this launch shortcut.class
specifies a fully qualified name of a Java class
that implements ILanuchShortcut
.label
specifies a label used to render this shortcut.icon
specifies a plug-in relative path to an icon used to
render this shortcut.modes
specifies a comma separated list of modes this shortcut
supports.perspective
one or more perspective entries enumerate the
perspectives that this shortcut is avilable in, from the run/debug cascade
menus.
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 |
public void launch(ISelection selection, String mode)
selection
- workbench selectionmode
- one of the launch modes defined by the
launch managerILaunchManager
public void launch(IEditorPart editor, String mode)
editor
- the active editor in the workbenchmode
- one of the launch modes defined by the launch
managerILaunchManager
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |