public static JBPopup getPopupContainerFor(@Nullable Component c) {
    if (c == null) return null;
    if (c instanceof JComponent) {
      JBPopup popup = (JBPopup)((JComponent)c).getClientProperty(JBPopup.KEY);
      if (popup != null) return popup;
    }
    final Window wnd = SwingUtilities.getWindowAncestor(c);
    return getPopupFor(wnd);
  }
public static JBPopup getPopupContainerFor(@Nullable Component c)