<!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 リリースでは 使用すべきではありません。トップレベルの「実行/デバッグ/プロファイル (Run/Debug/Profile)」カスケード・メニューは、現在、コンテキスト起動 (選択に依存する起動) をサポートしているため、クライアントは代わりに contextualLaunch
エレメントを指定します。
<!ELEMENT contextualLaunch (contextLabel* , enablement?)>
選択内容に依存する「実行/デバッグ/プロファイル (Run/Debug/Profile)」カスケード・メニューにショートカットを追加するためのすべての記述を保持します。
<!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 以降、デバッグ・プラットフォームは起動ショートカットおよび適用可能なモードごとにコマンド・ハンドラーを登録して、クライアントから起動ショートカットのキー・バインディングを定義できるようになっています。ハンドラーのコマンド ID が起動ショートカット ID 属性として生成され、その後にドット、および適用可能な起動モードが続きます。例えば、上記の起動ショートカットの例では、デバッグ・モードで起動する場合のコマンド ID は 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