一旦使用该对话框定义了启动配置,它就会显示在运行和/或调试菜单中。org.eclipse.debug.ui.launchShortcuts 扩展点用来注册启动快捷方式。在扩展定义中,可指定显示快捷方式的方式(运行或调试)和透视图。对于每个快捷方式,都必须指定 ILaunchShortcut 的实现。此类用于在视图或编辑器中作出特定选择时启动程序。
以下标记注册用于启动 Java 应用程序的快捷方式:
<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>