void (ActionEvent event) { PackageChooserDialog chooser = new PackageChooserDialog(GroovyBundle.message("dialog.create.class.package.chooser.title"), myProject); chooser.selectPackage(myPackageTextField.getText()); chooser.show(); PsiPackage aPackage = chooser.getSelectedPackage(); if (aPackage != null) { myPackageTextField.setText(aPackage.getQualifiedName()); } }