protected void showPopup(DataContext context, ListPopup popup, JComponent contextComponent) {
    Component focusedComponent = contextComponent != null ? contextComponent : PlatformCoreDataKeys.CONTEXT_COMPONENT.getData(context);
    if (focusedComponent != null) {
      if (popup instanceof PopupFactoryImpl.ActionGroupPopup && focusedComponent instanceof JLabel) {
        ((PopupFactoryImpl.ActionGroupPopup)popup).showUnderneathOfLabel((JLabel)focusedComponent);
      } else {
        popup.showUnderneathOf(focusedComponent);
      }
    }
    else {
      Rectangle r;
      int x;
      int y;
      focusedComponent = WindowManagerEx.getInstanceEx().getFocusedComponent((Project)null);
      r = WindowManagerEx.getInstanceEx().getScreenBounds();
      x = r.x + r.width / 2;
      y = r.y + r.height / 2;
      Point point = new Point(x, y);
      SwingUtilities.convertPointToScreen(point, focusedComponent.getParent());

      popup.showInScreenCoordinates(focusedComponent.getParent(), point);
    }
  }
protected void showPopup(DataContext context, ListPopup popup, JComponent contextComponent)