command.getCommand().addCommandListener(commandListener);
}
public final int getAccelerator() {
final String commandId = getActionDefinitionId();
final IBindingService bindingService = (IBindingService) serviceLocator
.getService(IBindingService.class);
final TriggerSequence triggerSequence = bindingService
.getBestActiveBindingFor(commandId);
if (triggerSequence instanceof KeySequence) {
final KeySequence keySequence = (KeySequence) triggerSequence;
final KeyStroke[] keyStrokes = keySequence.getKeyStrokes();
if (keyStrokes.length == 1) {