private PopupComponentFactory.PopupType getMostSuitablePopupType() {
    boolean forceDialog = myMayBeParent || SystemInfo.isMac && !(myOwner instanceof IdeFrame) && myOwner.isShowing();
    if (LoadingState.COMPONENTS_LOADED.isOccurred() && Registry.is("allow.dialog.based.popups")) {
      boolean noFocus = !myFocusable || !myRequestFocus;
      boolean cannotBeDialog = noFocus; // && SystemInfo.isXWindow

      if (!cannotBeDialog && (isPersistent() || forceDialog)) {
        return PopupComponentFactory.PopupType.DIALOG;
      }
    }
    if (myForcedHeavyweight || myResizable) {
      return PopupComponentFactory.PopupType.HEAVYWEIGHT;
    }
    return PopupComponentFactory.PopupType.DEFAULT;
  }
private PopupComponentFactory.PopupType getMostSuitablePopupType()