<!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>
perspective
元素在 3.1 版中已經廢除。現在,最上層的「執行/除錯/設定檔」階層式功能表可支援環境定義(可區分選項)啟動,
而用戶端應該改為提供 contextualLaunch
元素。
<!ELEMENT contextualLaunch (contextLabel* , enablement?)>
保留所有新增捷徑至可區分選項「執行/除錯/設定檔」階層式功能表的說明。
<!ELEMENT contextLabel EMPTY>
<!ATTLIST contextLabel
mode (run|debug|profile)
label CDATA #REQUIRED>
指定環境定義啟動模式的標籤。
上述範例中,啟動捷徑在執行和除錯階式排列功能表中將顯示為「範例啟動捷徑」標籤(在 JavaPerspective 和 DebugPerspective 之中)。<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 開始,除錯平台會針對每一個啟動捷徑及其適用模式來登錄一個指令處理常式,以容許用戶端為啟動捷徑定義按鍵連結。處理常式的指令 ID 會產生為啟動捷徑 ID 屬性,再加上一個句點和適用的啟動模式。例如,上述啟動捷徑範例的指令 ID 是
com.example.ExampleLaunchShortcutId.debug
,代表在除錯模式中啟動。指令和按鍵連結可以依照下列方式來定義,以將 "ALT-SHIFT-D, E
" 連結到啟動捷徑。
<extension point=
"org.eclipse.ui.commands"
>
<command name=
"除錯範例啟動"
description=
"除錯範例啟動"
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.
本程式與隨附的資料依照 Elipse Public License 1.0 版此次發行所隨附的條款而提供,
可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html