private boolean run(KeyEvent event) {
      myIsRunningAction = true;
      try {
        ActionManagerEx ex = ActionManagerEx.getInstanceEx();
        AnAction action = ex.getAction(myActionId);
        if (action == null) return false;

        if (!action.isEnabledInModalContext()) {
          // This check is copied IdeKeyEventDispatcher#dispatchKeyEvent method
          Window focusedWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
          if (focusedWindow != null && IdeKeyEventDispatcher.isModalContext(focusedWindow)) {
            return false;
          }
        }

        DataContext context = calculateContext();
        AnActionEvent actionEvent = AnActionEvent.createFromAnAction(action, event, ActionPlaces.KEYBOARD_SHORTCUT, context);
        if (!ActionUtil.lastUpdateAndCheckDumb(action, actionEvent, false)) {
          return false;
        }
        ActionUtil.performActionDumbAwareWithCallbacks(action, actionEvent);
        return true;
      }
      finally {
        myIsRunningAction = false;
      }
    }
private boolean run(KeyEvent event)