@Nullable
    Inlay<MyRenderer> add(@NotNull JComponent component, @NotNull ResizePolicy policy, @Nullable Properties.RendererFactory rendererFactory,
                          boolean relatesToPrecedingText, boolean showAbove, boolean showWhenFolded, boolean fullWidth, int priority, int offset) {
      if (myEditor.isDisposed()) return null;


      MyRenderer renderer = fullWidth ? new FullEditorWidthRenderer(component, policy, rendererFactory, myEditor.getScrollPane(), myResizeListener) : new MyRenderer(component, policy, rendererFactory, myEditor.getScrollPane(), myResizeListener);
      Inlay<MyRenderer> inlay = myEditor.getInlayModel().addBlockElement(offset,
                                                                         new InlayProperties()
                                                                           .relatesToPrecedingText(relatesToPrecedingText)
                                                                           .showAbove(showAbove)
                                                                           .priority(priority)
                                                                           .showWhenFolded(showWhenFolded),
                                                                         renderer);
      if (inlay == null) return null;
      Disposer.register(this, inlay);

      renderer.addComponentListener(new ComponentAdapter() {
        @Override
        public void componentResized(ComponentEvent e) {
          if (e.getSource() instanceof MyRenderer renderer) {
            revalidateComponents(renderer.getBounds().y);
          }
        }
      });

      renderer.addMouseWheelListener(myEditor.getContentComponent()::dispatchEvent);

      renderer.setInlay(inlay);
      myEditor.getContentComponent().add(renderer);
      Disposer.register(inlay, () -> {
        Runnable runnable = () -> {
          renderer.setInlay(null);
          myEditor.getContentComponent().remove(renderer);
        };
        Application application = ApplicationManager.getApplication();
        if (application.isDispatchThread()) runnable.run();
        else application.invokeLater(runnable);
      });

      // If validation is postponed, visual artifacts can appear while typing text.
      if (!myEditor.getInlayModel().isInBatchMode()) {
        renderer.validate();
      }

      return inlay;
    }
@Nullable
    Inlay<MyRenderer> add(@NotNull JComponent component, @NotNull ResizePolicy policy, @Nullable Properties.RendererFactory rendererFactory,
                          boolean relatesToPrecedingText, boolean showAbove, boolean showWhenFolded, boolean fullWidth, int priority, int offset)