@Override
    @SuppressWarnings("deprecation")
    public void show() {

      final DialogWrapper dialogWrapper = getDialogWrapper();
      boolean isAutoAdjustable = dialogWrapper.isAutoAdjustable();
      Point location = null;
      if (LOG.isDebugEnabled()) {
        LOG.debug("START preparing to show a dialog titled '" + getTitle() + "', isAutoAdjustable=" + isAutoAdjustable + ", the monitor configuration is:");
        logMonitorConfiguration();
      }
      if (isAutoAdjustable) {
        if (SystemInfoRt.isMac) {
          myMacDirtySizeHack = new MacDirtySizeHack(getWidth(), getHeight());
          addComponentListener(myMacDirtySizeHack);
        }
        pack();

        Dimension initial = dialogWrapper.getInitialSize();
        if (LOG.isDebugEnabled()) {
          LOG.debug("The initial size of the dialog as set/overridden by the API user: " + initial);
        }
        if (initial == null) initial = new Dimension();
        if (initial.width <= 0 || initial.height <= 0) {
          Dimension packedSize = getSize();
          if (LOG.isDebugEnabled()) {
            LOG.debug("The size of the dialog after packing: " + packedSize);
          }
          maximize(initial, packedSize); // cannot be less than packed size
          if (LOG.isDebugEnabled()) {
            LOG.debug("The initial size after coercing it to be at least the packed size: " + initial);
          }
          if (!SystemInfoRt.isLinux && Registry.is("ide.dialog.wrapper.resize.by.tables", false)) {
            // [kb] temporary workaround for IDEA-253643
            maximize(initial, getSizeForTableContainer(getContentPane()));
          }
        }
        Dimension minimumSize = getMinimumSize();
        if (LOG.isDebugEnabled()) {
          LOG.debug("The minimum size of the dialog: " + minimumSize);
        }
        maximize(initial, minimumSize); // cannot be less than minimum size
        if (LOG.isDebugEnabled()) {
          LOG.debug("The initial size after coercing it to be at least the minimum size: " + initial);
        }
        float hs = dialogWrapper.getHorizontalStretch();
        initial.width *= (int)hs;
        float vs = dialogWrapper.getVerticalStretch();
        initial.height *= (int)vs;
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting the initial size after stretching it by (" + hs + "," + vs + "): " + initial);
        }
        setSize(initial);

        // Restore dialog's size and location

        myDimensionServiceKey = dialogWrapper.getDimensionKey();
        if (LOG.isDebugEnabled()) {
          LOG.debug("The dimension service key is '" + myDimensionServiceKey + "'");
        }

        if (myDimensionServiceKey != null) {
          final Project projectGuess = guessProjectDependingOnKey(myDimensionServiceKey);
          if (LOG.isDebugEnabled()) {
            LOG.debug("The project is " + projectGuess);
          }
          location = getWindowStateService(projectGuess).getLocation(myDimensionServiceKey);
          Dimension size = getWindowStateService(projectGuess).getSize(myDimensionServiceKey);
          if (LOG.isDebugEnabled()) {
            LOG.debug("The stored location and size are " + location + " and " + size + (size != null ? ", using them to set the initial bounds" : ""));
          }
          if (size != null) {
            myInitialSize = new Dimension(size);
            _setSizeForLocation(myInitialSize.width, myInitialSize.height, location);
          }
        }

        if (myInitialSize == null) {
          Dimension initialSize = dialogWrapper.getInitialSize();
          myInitialSize = initialSize != null ? initialSize : getSize();
        }
      }

      if (location == null) {
        location = dialogWrapper.getInitialLocation();
        if (LOG.isDebugEnabled()) {
          LOG.debug("The initial location is " + location);
        }
      }

      if (location != null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting the location to " + location);
        }
        setLocation(location);
      }
      else {
        Window owner = getOwner();
        if (LOG.isDebugEnabled()) {
          LOG.debug("Setting the location relative to " + owner);
        }
        setLocationRelativeTo(owner);
      }

      if (isAutoAdjustable) {
        final Rectangle bounds = getBounds();
        if (LOG.isDebugEnabled()) {
          LOG.debug("Performing auto-adjustment for the resulting bounds: " + bounds);
        }
        fitToScreen(bounds);
        if (LOG.isDebugEnabled()) {
          LOG.debug("The bounds after fitting to screen: " + bounds);
        }
        setBounds(bounds);
      }

      DialogWrapper wrapper = myDialogWrapper == null ? null : myDialogWrapper.get();
      if (wrapper != null) {
        wrapper.beforeShowCallback();
      }

      if (!SystemInfoRt.isMac || !WindowRoundedCornersManager.isAvailable()) {
        setBackground(UIUtil.getPanelBackground());
      }
      if (LOG.isDebugEnabled()) {
        LOG.debug("END preparing to show the dialog, the resulting bounds: " + getBounds());
      }
      if (dialogWrapper.isDisposed()) {
        LOG.warn("The dialog wrapper for " + dialogWrapper.getTitle() + " is already disposed");
        return;
      }
      super.show();
    }
@Override
    @SuppressWarnings("deprecation")
    public void show()