private void addHighlighters(int editorLine, @NotNull AnnotatedLineModificationDetails details) {
    Document document = myEditor.getDocument();
    if (editorLine >= DiffUtil.getLineCount(document)) return;

    int lineStartOffset = document.getLineStartOffset(editorLine);
    int lineEndOffset = document.getLineEndOffset(editorLine);
    String currentContent = document.getCharsSequence().subSequence(lineStartOffset, lineEndOffset).toString();

    String contentAfter = details.lineContentAfter;
    List<InnerChange> changes = details.changes;

    myDisposable = Disposer.newDisposable();
    DiffDrawUtil.setupLayeredRendering(myEditor, editorLine, editorLine + 1, DiffDrawUtil.LAYER_PRIORITY_MAX, myDisposable);

    InnerChange onlyItem = ContainerUtil.getOnlyItem(changes);
    if (onlyItem != null && onlyItem.startOffset == 0 && onlyItem.endOffset == contentAfter.length()) {
      TextDiffType diffType = getDiffType(onlyItem.type);
      myHighlighters.addAll(
        new DiffDrawUtil.LineHighlighterBuilder(myEditor, editorLine, editorLine + 1, diffType)
          .withLayerPriority(DiffDrawUtil.LAYER_PRIORITY_MAX)
          .withIgnored(false)
          .withHideStripeMarkers(true)
          .done());
    }
    else {
      myHighlighters.addAll(
        new DiffDrawUtil.LineHighlighterBuilder(myEditor, editorLine, editorLine + 1, TextDiffType.MODIFIED)
          .withLayerPriority(DiffDrawUtil.LAYER_PRIORITY_MAX)
          .withIgnored(true)
          .withHideStripeMarkers(true)
          .done());

      List<InnerChange> currentChanges = adjustChangesToCurrent(currentContent, contentAfter, changes);
      for (InnerChange change : currentChanges) {
        int start = lineStartOffset + change.startOffset;
        int end = lineStartOffset + change.endOffset;
        TextDiffType diffType = getDiffType(change.type);
        LOG.assertTrue(start <= end && end <= lineEndOffset, String.format("Range: [%s, %s), Line range: [%s, %s)",
                                                                           start, end, lineStartOffset, lineEndOffset));
        myHighlighters.addAll(new DiffDrawUtil.InlineHighlighterBuilder(myEditor, start, end, diffType)
                                .withLayerPriority(DiffDrawUtil.LAYER_PRIORITY_MAX)
                                .done());
      }
    }
  }
private void addHighlighters(int editorLine, @NotNull AnnotatedLineModificationDetails details)