protected static void executeImpl(IndexPatternSearch.SearchParameters queryParameters,
                                    Processor<? super IndexPatternOccurrence> consumer) {
    final IndexPatternProvider patternProvider = queryParameters.getPatternProvider();
    PsiFile file = queryParameters.getFile();


    final CharSequence chars;
    FileViewProvider viewProvider = file.getViewProvider();
    if (viewProvider instanceof BackFileViewProvider) {
      file = ((BackFileViewProvider)viewProvider).getFrontPsiFile();
      if (file == null) {
        return;
      }
      viewProvider = file.getViewProvider();
    }

    chars = viewProvider.getContents();
    boolean multiLine = queryParameters.isMultiLine();
    List<CommentRange> commentRanges = findCommentTokenRanges(file, chars, queryParameters.getRange(), multiLine);
    IntList occurrences = new IntArrayList(1);
    IndexPattern[] patterns = patternProvider != null ? patternProvider.getIndexPatterns()
                                                      : new IndexPattern[] {queryParameters.getPattern()};

    for (int i = 0; i < commentRanges.size(); i++) {
      occurrences.clear();

      for (int j = patterns.length - 1; j >=0; --j) {
        if (!collectPatternMatches(patterns, patterns[j], chars, commentRanges, i, file, queryParameters.getRange(), consumer,
                                   occurrences, multiLine)) {
          return;
        }
      }
    }
  }
protected static void executeImpl(IndexPatternSearch.SearchParameters queryParameters,
                                    Processor<? super IndexPatternOccurrence> consumer)