Package org.eclipse.ui.internal
Class KeyBindingService
java.lang.Object
org.eclipse.ui.internal.KeyBindingService
- All Implemented Interfaces:
- IKeyBindingService,- INestableKeyBindingService
This service provides a nestable implementation of a key binding service.
 This class is provided for backwards compatibility only, and might be removed
 in the future. All of the functionality is the class can be duplicated by
 using the commands and contexts API.
- Since:
- 2.0
- 
Constructor SummaryConstructorsConstructorDescriptionKeyBindingService(IWorkbenchPartSite workbenchPartSite) Constructs a new instance ofKeyBindingServiceon a given workbench site.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanactivateKeyBindingService(IWorkbenchSite nestedSite) Marks the service associated withnestedSiteas active if one exists.voiddispose()Disposes this key binding service.getKeyBindingService(IWorkbenchSite nestedSite) An accessor for the nested key binding service associated with a particular site.String[]Returns the active accelerator scope ids.voidregisterAction(IAction action) Registers an action with the key binding service.booleanremoveKeyBindingService(IWorkbenchSite nestedSite) Removes a nested key binding service from this key binding service.voidSets the active accelerator scope ids.voidunregisterAction(IAction action) Unregisters an action with the key binding service.
- 
Constructor Details- 
KeyBindingServiceConstructs a new instance ofKeyBindingServiceon a given workbench site. This instance is not nested.- Parameters:
- workbenchPartSite- The site for which this service will be responsible; should not be- null.
 
 
- 
- 
Method Details- 
activateKeyBindingServiceDescription copied from interface:INestableKeyBindingServiceMarks the service associated withnestedSiteas active if one exists. If there is no service associated, then nothing changes. Calling this method withnullforces deactivation of the current service.- Specified by:
- activateKeyBindingServicein interface- INestableKeyBindingService
- Parameters:
- nestedSite- The site whose service should be activated;- nullif the current service should be deactivated.
- Returns:
- trueif a service is activated (or deactivated, in the case of a- nullparameter);- falseif nothing changed.
 
- 
disposepublic void dispose()Disposes this key binding service. This clears out all of the submissions held by this service, and its nested services.
- 
getKeyBindingServiceDescription copied from interface:INestableKeyBindingServiceAn accessor for the nested key binding service associated with a particular site. If the key binding service does not exist for thisnestedSitealready, then a new one should be constructed.- Specified by:
- getKeyBindingServicein interface- INestableKeyBindingService
- Parameters:
- nestedSite- The site for which the service should be found; should not be- null.
- Returns:
- The associated service, if any; or a new associated service, if none existed previously.
 
- 
getScopesDescription copied from interface:IKeyBindingServiceReturns the active accelerator scope ids.- Specified by:
- getScopesin interface- IKeyBindingService
- Returns:
- the active accelerator scope ids.
 
- 
registerActionDescription copied from interface:IKeyBindingServiceRegisters an action with the key binding service.- Specified by:
- registerActionin interface- IKeyBindingService
- Parameters:
- action- the action to be registered with the key binding service.
 
- 
removeKeyBindingServiceDescription copied from interface:INestableKeyBindingServiceRemoves a nested key binding service from this key binding service. The service to remove is determined by thenestedSitewith which it is associated.- Specified by:
- removeKeyBindingServicein interface- INestableKeyBindingService
- Parameters:
- nestedSite- The site from which to remove the nested service. This site must not be- null.
- Returns:
- trueif the service existed and could be removed;- falseotherwise.
 
- 
setScopesDescription copied from interface:IKeyBindingServiceSets the active accelerator scope ids.- Specified by:
- setScopesin interface- IKeyBindingService
- Parameters:
- scopes- the active accelerator scope ids.
 
- 
unregisterActionDescription copied from interface:IKeyBindingServiceUnregisters an action with the key binding service.- Specified by:
- unregisterActionin interface- IKeyBindingService
- Parameters:
- action- the action to be unregistered with the key binding service.
 
 
-