AntInstallation () { FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor(); VirtualFile file = FileChooser.chooseFile(descriptor, myParent, null, null); if (file == null) return null; try { final AntInstallation inst = AntInstallation.fromHome(file.getPresentableUrl()); adjustName(inst); return inst; } catch (AntInstallation.ConfigurationException e) { Messages.showErrorDialog(myParent, e.getMessage(), AntBundle.message("ant.setup.dialog.title")); return null; } }