Once a launch configuration has been defined using the dialog, it can be shown in the run and/or debug menus. The org.eclipse.debug.ui.launchShortcuts extension point is used to register launch shortcuts. In the extension definition, you can specify in which modes (run or debug) and in which perspectives the shortcuts are shown. For each shortcut, specify an implementation of ILaunchShortcut. This class is used to launch a program given a particular selection in a view or editor.
The following markup registers shortcuts for launching a Java application:
<extension point = "org.eclipse.debug.ui.launchShortcuts"> <shortcut id="org.eclipse.jdt.debug.ui.localJavaShortcut" class="org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationShortcut" label="%JavaApplicationShortcut.label" icon="icons/full/ctool16/java_app.gif" helpContextId="org.eclipse.jdt.debug.ui.shortcut_local_java_application" modes="run, debug"> <perspective id="org.eclipse.jdt.ui.JavaPerspective"/> <perspective id="org.eclipse.jdt.ui.JavaHierarchyPerspective"/> <perspective id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/> <perspective id="org.eclipse.debug.ui.DebugPerspective"/> </shortcut> </extension>