void (ActionEvent e) { final PackageChooserDialog chooser = new PackageChooserDialog(chooserTitle, project); chooser.selectPackage(getText()); if (chooser.showAndGet()) { final PsiPackage aPackage = chooser.getSelectedPackage(); if (aPackage != null) { setText(aPackage.getQualifiedName()); } } }