private @NotNull @Nls String wrapToSize(@NotNull @Nls String hint) {
    if (StringUtil.isEmpty(hint)) return hint;

    Dimension size = myContent.getSize();
    if (size.width == 0 && size.height == 0) {
      size = myContent.computePreferredSize();
    }

    JBInsets.removeFrom(size, myContent.getInsets());
    JBInsets.removeFrom(size, myAdComponent.getInsets());

    int width = Math.max(JBUI.CurrentTheme.Popup.minimumHintWidth(), size.width);
    return HtmlChunk.text(hint).wrapWith(HtmlChunk.div().attr("width", width)).wrapWith(HtmlChunk.html()).toString();
  }
private @NotNull @Nls String wrapToSize(@NotNull @Nls String hint)