@Override
  public void actionPerformed(@NotNull AnActionEvent e) {
    EditorSearchSession search = e.getData(EditorSearchSession.SESSION_KEY);
    if (search == null) return;
    if (KeymapUtil.isEmacsKeymap()) {
      // Emacs users are accustomed to the editor that executes 'find next' on subsequent pressing of shortcut that
      // activates 'incremental search'. Hence, we do the similar hack here for them.
      final EditorAction action = (EditorAction)ActionManager.getInstance().getAction(IdeActions.ACTION_FIND_NEXT);
      action.actionPerformed(search.getEditor(), e.getDataContext());
      return;
    }

    final FindModel findModel = search.getFindModel();
    if (findModel.isReplaceState()) {
      findModel.setReplaceState(false);
    }
    search.getComponent().getSearchTextComponent().selectAll();
  }
@Override
  public void actionPerformed(@NotNull AnActionEvent e)