private static void addOccurrenceHighlight(@NotNull Editor editor,
                                             int start,
                                             int end,
                                             @Nullable TextAttributes forcedAttributes,
                                             @Nullable TextAttributesKey attributesKey,
                                             int flags,
                                             @Nullable Collection<? super RangeHighlighter> outHighlighters,
                                             @Nullable Color scrollMarkColor) {
    MarkupModelEx markupModel = (MarkupModelEx)editor.getMarkupModel();
    markupModel.addRangeHighlighterAndChangeAttributes(attributesKey, start, end, OCCURRENCE_LAYER,
                                                       HighlighterTargetArea.EXACT_RANGE, false, highlighter -> {

        addEditorHighlighterWithHideFlags(editor, highlighter, flags);

        highlighter.setVisibleIfFolded(true);
        if (outHighlighters != null) {
          outHighlighters.add(highlighter);
        }

        if (forcedAttributes != null) {
          highlighter.setTextAttributes(forcedAttributes);
        }

        if (scrollMarkColor != null) {
          highlighter.setErrorStripeMarkColor(scrollMarkColor);
        }
      });
  }
private static void addOccurrenceHighlight(@NotNull Editor editor,
                                             int start,
                                             int end,
                                             @Nullable TextAttributes forcedAttributes,
                                             @Nullable TextAttributesKey attributesKey,
                                             int flags,
                                             @Nullable Collection<? super RangeHighlighter> outHighlighters,
                                             @Nullable Color scrollMarkColor)