public void addHighlToView(final Editor view, EditorColorsScheme scheme, final Map<TextAttributesKey,@NlsContexts.Tooltip String> displayText) {

    // XXX: Hack
    if (HighlighterColors.BAD_CHARACTER.equals(myHighlightType)) {
      return;
    }

    final TextAttributes attr = scheme.getAttributes(myHighlightType);
    if (attr != null) {
      UIUtil.invokeAndWaitIfNeeded(() -> {
        try {
          // IDEA-53203: add ERASE_MARKER for manually defined attributes
          RangeHighlighter erasedHighlighter = view.getMarkupModel()
            .addRangeHighlighter(myHighlightType, myStartOffset, myEndOffset, HighlighterLayer.ADDITIONAL_SYNTAX,
                                 HighlighterTargetArea.EXACT_RANGE);
          if (erasedHighlighter instanceof RangeHighlighterEx) {
            ((RangeHighlighterEx)erasedHighlighter).setTextAttributes(TextAttributes.ERASE_MARKER);
          }

          RangeHighlighter highlighter = view.getMarkupModel()
            .addRangeHighlighter(myHighlightType, myStartOffset, myEndOffset, HighlighterLayer.ADDITIONAL_SYNTAX,
                                 HighlighterTargetArea.EXACT_RANGE);
          final Color errorStripeColor = attr.getErrorStripeColor();
          highlighter.setErrorStripeMarkColor(errorStripeColor);
          final String tooltip = displayText.get(myHighlightType);
          highlighter.setErrorStripeTooltip(tooltip);
          if (highlighter instanceof RangeHighlighterEx) ((RangeHighlighterEx)highlighter).setVisibleIfFolded(true);
        }
        catch (Exception e) {
          throw new RuntimeException(e);
        }
      });
    }
  }
public void addHighlToView(final Editor view, EditorColorsScheme scheme, final Map<TextAttributesKey,@NlsContexts.Tooltip String> displayText)