private void runSearchTask(SearchTaskOptions searchTaskOptions, FileDataProviderForSearch fileDataProviderForSearch) {
    final RangeSearchTask newRangeSearchTask = new RangeSearchTask(
      searchTaskOptions, myProject, fileDataProviderForSearch, this);
    lastExecutedRangeSearchTask = newRangeSearchTask;
    if (inBackground) {
      String title = newRangeSearchTask.getTitleForBackgroundableTask();
      Task.Backgroundable task = new Task.Backgroundable(null, title, true) {
        @Override
        public void run(@NotNull ProgressIndicator indicator) {
          newRangeSearchTask.setProgressIndicator(indicator);
          newRangeSearchTask.run();
        }
      };
      ProgressManager.getInstance().run(task);
      setAdditionalStatusText(null);
    }
    else {
      newRangeSearchTask.run();
    }
  }
private void runSearchTask(SearchTaskOptions searchTaskOptions, FileDataProviderForSearch fileDataProviderForSearch)