<!ELEMENT extension (shortcut*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT shortcut (perspective* , contextualLaunch? , enablement?)>
<!ATTLIST shortcut
id CDATA #REQUIRED
modes CDATA #REQUIRED
class CDATA #REQUIRED
label CDATA #REQUIRED
icon CDATA #IMPLIED
category CDATA #IMPLIED
helpContextId CDATA #IMPLIED
path CDATA #IMPLIED>
org.eclipse.debug.ui.ILaunchShortcut
的类的标准名称。null
(缺省值)。path
属性按字母顺序对启动快捷方式进行分组,然后基于 label
属性在组中按字母顺序进行排序。当未指定此项时,一个快捷方式出现在最后一个组中。在 3.0.1 发行版中添加了此属性。<!ELEMENT perspective EMPTY>
<!ATTLIST perspective
id CDATA #REQUIRED>
3.1 发行版中已不推荐 perspective
元素。顶级“运行/调试/概要分析”级联菜单现在支持上下文(选择敏感)启动,并且客户机应提供 contextualLaunch
元素来代替。
<!ELEMENT contextualLaunch (contextLabel* , enablement?)>
保持有关将快捷方式添加至选择敏感“运行/调试/概要分析”级联菜单的所有描述。
<!ELEMENT contextLabel EMPTY>
<!ATTLIST contextLabel
mode (run|debug|profile)
label CDATA #REQUIRED>
指定上下文启动方式的标签。
在上面的示例中,启动快捷方式将显示在 JavaPerspective 和 DebugPerspective 中标签为“Example Launch Shortcut”的运行和调试级联菜单中。<extension point=
"org.eclipse.debug.ui.launchShortcuts"
>
<shortcut id=
"com.example.ExampleLaunchShortcutId"
modes=
"run,debug"
class=
"com.example.ExampleLaunchShortcutImpl"
label=
"Example Launch Shortcut"
icon=
"icons/examples.gif"
>
<perspective id=
"org.eclipse.jdt.ui.JavaPerspective"
/>
<perspective id=
"org.eclipse.debug.ui.DebugPerspective"
/>
</shortcut>
</extension>
class 属性的值必须是实现 org.eclipse.debug.ui.ILaunchShortcut 接口的 Java 类的标准名称。
从 3.1 开始,调试平台为每个启动快捷方式及其适用的方式注册一个命令处理程序,以允许客户机为启动快捷方式定义键绑定。处理程序的命令标识将作为启动快捷方式标识属性生成,后跟一个点和适用的启动方式。例如,以上启动快捷方式示例的命令标识将为
com.example.ExampleLaunchShortcutId.debug
,用于在调试方式下启动。命令和键绑定可以定义如下,以将“ALT-SHIFT-D, E
”绑定至启动快捷方式。
<extension point=
"org.eclipse.ui.commands"
>
<command name=
"Debug Example Launch"
description=
"Debug Example Launch"
categoryId=
"org.eclipse.debug.ui.category.run"
id=
"com.example.ExampleLaunchShortcutId.debug"
>
</command>
<keyBinding keySequence=
"M3+M2+D E"
contextId=
"org.eclipse.ui.globalScope"
commandId=
"com.example.ExampleLaunchShortcutId.debug"
keyConfigurationId=
"org.eclipse.ui.defaultAcceleratorConfiguration"
>
</keyBinding>
</extension>
Copyright (c) 2000, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which
accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html