private void synchronizeBoundsWithInlay() {
      if (myInlay != null && !myResizeListener.isResizeInProgress(this) && !myInlay.getEditor().getDocument().isInBulkUpdate()) {
        Rectangle inlayBounds = myInlay.getBounds();
        boolean shouldUpdateInlay;
        if (inlayBounds != null) {
          inlayBounds.setLocation(inlayBounds.x + verticalScrollbarLeftShift(), inlayBounds.y);

          int visibleWidth = myEditorScrollPane.getViewport().getWidth() - myEditorScrollPane.getVerticalScrollBar().getWidth();
          Rectangle newBounds = new Rectangle(
            inlayBounds.x,
            inlayBounds.y,
            isWidthSet() ? myCustomWidth : Math.min(getPreferredWidth(), visibleWidth),
            getPreferredHeight()
          );
          shouldUpdateInlay = !isVisible() || !newBounds.equals(inlayBounds);
          if (shouldUpdateInlay || !newBounds.equals(getBounds())) {
            setVisible(true);
            setBounds(newBounds);
          }
        }
        else {
          shouldUpdateInlay = isVisible();
          setVisible(false);
        }
        if (shouldUpdateInlay) {
          myInlay.update();
        }
      }
    }
private void synchronizeBoundsWithInlay()