public void runNewSearch(SearchTaskOptions options, FileDataProviderForSearch fileDataProviderForSearch, boolean inBackground) {
    this.inBackground = inBackground;

    long pagesAmount;
    try {
      pagesAmount = fileDataProviderForSearch.getPagesAmount();
    }
    catch (IOException e) {
      logger.warn(e);
      Messages.showWarningDialog(EditorBundle.message("large.file.editor.message.working.with.file.error"),
                                 CommonBundle.getErrorTitle());
      return;
    }

    long initialBorderPageNumber;
    if (options.searchForwardDirection) {
      initialBorderPageNumber = options.leftBoundPageNumber == SearchTaskOptions.NO_LIMIT ?
                                0 : options.leftBoundPageNumber;
    }
    else {
      initialBorderPageNumber = options.rightBoundPageNumber == SearchTaskOptions.NO_LIMIT ?
                                pagesAmount - 1 : options.rightBoundPageNumber;
    }

    setLeftBorderPageNumber(initialBorderPageNumber);
    setRightBorderPageNumber(initialBorderPageNumber);

    runSearchTask(options, fileDataProviderForSearch);
  }
public void runNewSearch(SearchTaskOptions options, FileDataProviderForSearch fileDataProviderForSearch, boolean inBackground)