private void close() {
    if (myRbImport.isSelected()) {
      String text = myPrevInstallation.getText();
      if (StringUtil.isEmptyOrSpaces(text)) {
        showError(BootstrapBundle.message("import.chooser.error.empty", myProductName));
        return;
      }

      Path selectedDir = Paths.get(FileUtil.toCanonicalPath(text.trim()));

      if (Files.isRegularFile(selectedDir)) {
        if (!ConfigImportHelper.isValidSettingsFile(selectedDir.toFile())) {
          showError(BootstrapBundle.message("import.chooser.error.invalid", selectedDir));
          return;
        }
        myResult = new Pair<>(selectedDir, null);
      }
      else {
        if (FileUtil.pathsEqual(selectedDir.toString(), PathManager.getHomePath()) ||
            FileUtil.pathsEqual(selectedDir.toString(), PathManager.getConfigPath())) {
          showError(BootstrapBundle.message("import.chooser.error.current", myProductName));
          return;
        }

        Pair<Path, Path> result = myValidator.apply(selectedDir);
        if (result == null) {
          showError(BootstrapBundle.message("import.chooser.error.unrecognized", selectedDir, myProductName));
          return;
        }

        myResult = result;
      }
    }

    dispose();
  }
private void close()