@Override
  public void update(@NotNull AnActionEvent e) {
    RangeSearchTask task = myRangeSearch.getLastExecutedRangeSearchTask();
    e.getPresentation().setEnabled(
      task != null && !task.isFinished() && !task.isShouldStop()
    );
  }
@Override
  public void update(@NotNull AnActionEvent e)