キー・バインディング

コマンドを起動する、コマンドとキーの組み合わせの関連をキー・バインディングと呼びます。 プラグインは、キー・バインディングとコマンドを org.eclipse.ui.bindings 拡張ポイントに定義できます。

...
<key
      sequence="Ctrl+S"
      commandId="org.eclipse.ui.file.save"
      schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
</key>
...

同様に org.eclipse.ui.file.save もあります。  仮定のアクション定義を思い出してください。

<extension point = "org.eclipse.ui.actionSets">
	   <actionSet id="com.example.actions.actionSet"
		   label="Example Actions"
		   visible="true">
		   <action id="com.example.actions.action1"
			   menubarPath="additions"
			   label="Example Save Action"
			   class="org.example.actions.ExampleActionDelegate"
			   definitionID="org.eclipse.ui.file.save">
		   </action>
		   ...
	   </actionSet>
</extension>

キー・バインディングの sequence 属性は、コマンドを起動するために使用されるキーの組み合わせを定義します。 そのため、サンプルのアクション・セットがアクティブであるとき、ユーザーが Ctrl+S を選択すると save アクションが起動されます。

同様に、ワークベンチ SaveAction がアクティブであるときは、同じキー組み合わせを使用して、 代わりにこれを起動できます。これは、ワークベンチが SaveAction のために同じコマンド ID を使用するためです。

サンプルを完了するには、構成について理解する必要があります。