@Override
    public @NotNull Map<TodoIndexEntry, Integer> map(final @NotNull FileContent inputData) {
      IndexPattern[] patterns = IndexPatternUtil.getIndexPatterns();
      BaseFilterLexer.TodoScanningState todoScanningState = createTodoScanningState(patterns);
      if (patterns.length == 0) return Collections.emptyMap();

      final CharSequence chars = inputData.getContentAsText();
      final OccurrenceConsumer occurrenceConsumer = new OccurrenceConsumer(null, true);
      EditorHighlighter highlighter;

      final EditorHighlighter editorHighlighter = inputData.getUserData(EDITOR_HIGHLIGHTER);
      if (editorHighlighter != null && EditorHighlighterCache.checkCanUseCachedEditorHighlighter(chars, editorHighlighter)) {
        highlighter = editorHighlighter;
      }
      else {
        highlighter = HighlighterFactory.createHighlighter(inputData.getProject(), inputData.getFile());
        highlighter.setText(chars);
      }

      final int documentLength = chars.length();
      final HighlighterIterator iterator = highlighter.createIterator(0);

      while (!iterator.atEnd()) {
        final IElementType token = iterator.getTokenType();

        if (myCommentTokens.contains(token) || CacheUtil.isInComments(token)) {
          int start = iterator.getStart();
          if (start >= documentLength) break;
          int end = iterator.getEnd();

          BaseFilterLexer.advanceTodoItemsCount(
            chars.subSequence(start, Math.min(end, documentLength)),
            occurrenceConsumer,
            todoScanningState
          );
          if (end > documentLength) break;
        }
        iterator.advance();
      }
      final Map<TodoIndexEntry, Integer> map = new HashMap<>();
      for (IndexPattern pattern : patterns) {
        final int count = occurrenceConsumer.getOccurrenceCount(pattern);
        if (count > 0) {
          map.put(new TodoIndexEntry(pattern.getPatternString(), pattern.isCaseSensitive()), count);
        }
      }
      return map;
    }
@Override
    public @NotNull Map<TodoIndexEntry, Integer> map(final @NotNull FileContent inputData)