* the command to be checked
* @return true if the given key event can trigger the passed command (and
* false otherwise).
*/
public static boolean matchesKeybinding(final KeyEvent event, final String commandId) {
final IBindingService bindingSvc = (IBindingService) PlatformUI.getWorkbench()
.getAdapter(IBindingService.class);
final TriggerSequence[] activeBindingsFor = bindingSvc
.getActiveBindingsFor(commandId);
for (final TriggerSequence seq : activeBindingsFor) {
if (seq instanceof KeySequence) {
final KeySequence keySequence = (KeySequence) seq;