Provides services related to the binding architecture (e.g., keyboard
shortcuts) within the workbench. This service can be used to access the
currently active bindings, as well as the current state of the binding
architecture.
since: 3.1
Constructor Summary
public
BindingService(BindingManager bindingManager, ICommandService commandService, Workbench workbench) Constructs a new instance of BindingService using a JFace
binding manager.
Method Summary
final public void
addBinding(Binding binding) TODO Promote this method to API.
Adds a single new binding to the existing array of bindings.
Constructs a new instance of BindingService using a JFace
binding manager.
Parameters: bindingManager - The bind ing manager to use; must not be null. Parameters: commandService - The command service providing support for this service; mustnot be null; Parameters: workbench - The workbench on which this context service will act; must notbe null.
Method Detail
addBinding
final public void addBinding(Binding binding)(Code)
TODO Promote this method to API.
Adds a single new binding to the existing array of bindings. If the array
is currently null, then a new array is created and this
binding is added to it. This method does not detect duplicates.
This method completes in amortized O(1).
Parameters: binding - The binding to be added; must not be null.
Returns the key binding architecture for the workbench. This method is
internal, and is only intended for testing. This must not be used by
clients.
The key binding support; never null.
final public void removeBinding(Binding binding)(Code)
Remove the specific binding by identity. Does nothing if the binding is
not in the manager.
Parameters: binding - The binding to be removed; must not be null.
savePreferences
final public void savePreferences(Scheme activeScheme, Binding[] bindings) throws IOException(Code)
setKeyFilterEnabled
final public void setKeyFilterEnabled(boolean enabled)(Code)