private <T extends EditorCustomElementRenderer> Inlay<T> addBlockElement(int offset,
                                                                           boolean relatesToPrecedingText,
                                                                           boolean showAbove,
                                                                           boolean showWhenFolded,
                                                                           int priority,
                                                                           @NotNull T renderer) {
    EditorImpl.assertIsDispatchThread();
    offset = Math.max(0, Math.min(myEditor.getDocument().getTextLength(), offset));
    BlockInlayImpl<T> inlay = new BlockInlayImpl<>(myEditor, offset, relatesToPrecedingText, showAbove, showWhenFolded, priority, renderer);
    notifyAdded(inlay);
    return inlay;
  }
private <T extends EditorCustomElementRenderer> Inlay<T> addBlockElement(int offset,
                                                                           boolean relatesToPrecedingText,
                                                                           boolean showAbove,
                                                                           boolean showWhenFolded,
                                                                           int priority,
                                                                           @NotNull T renderer)