Accelerator configurations are used to represent a general style or theme of accelerator sets. For example, the Workbench provides a "Default" accelerator configuration and an "Emacs" accelerator configuration. Only one accelerator configuration is active at any given time. End users control which one is active using the workbench Preferences dialog.
From an implementation point of view, accelerator configurations are simply named groupings of accelerator sets. An accelerator configuration won't accomplish anything on its own unless there are accelerator sets associated with it. In fact, an accelerator configuration won't be shown in the Preferences dialog if there is no accelerator set defined for it.
Let's look again at the workbench emacs accelerator set to see how it gets associated with an accelerator configuration:
<extension point="org.eclipse.ui.acceleratorSets"> <acceleratorSet scopeId="org.eclipse.ui.globalScope" configurationId="org.eclipse.ui.emacsAcceleratorConfiguration"> <accelerator key="Ctrl+F4||Ctrl+X Ctrl+K" id="org.eclipse.ui.file.close"> </accelerator> <accelerator key="Ctrl+Shift+F4||Ctrl+X Ctrl+C" id="org.eclipse.ui.file.closeAll"> </accelerator> <accelerator key="Ctrl+X Ctrl+S" id="org.eclipse.ui.file.save"> </accelerator> ...
When an accelerator set is defined, it specifies the configurationID of its associated accelerator configuration. The accelerator set will only be used if the user has chosen the accelerator configuration to which the set belongs.
When a plug-in defines an accelerator set, it often assigns it to an existing accelerator configuration. However, your plug-in may want to define a completely new style of accelerators. If this is the case, you can define a new type of accelerator configuration using the org.eclipse.ui.acceleratorConfigurations extension point. The workbench markup for its accelerator configurations is shown below:
<extension point="org.eclipse.ui.acceleratorConfigurations"> <acceleratorConfiguration name="%DefaultAcceleratorConfiguration.name" description="%DefaultAcceleratorConfiguration.description" id="org.eclipse.ui.defaultAcceleratorConfiguration"> </acceleratorConfiguration> <acceleratorConfiguration name="%EmacsAcceleratorConfiguration.name" description="%EmacsAcceleratorConfiguration.description" id="org.eclipse.ui.emacsAcceleratorConfiguration"> </acceleratorConfiguration> </extension>
The name is used in the preferences page in the list of available configurations.