void (ActionEvent e) { final TreeClassChooserFactory factory = TreeClassChooserFactory.getInstance(myProject); final GlobalSearchScope scope = GlobalSearchScope.allScope(myProject); final PsiClass aClass = JavaPsiFacade.getInstance(myProject).findClass(myField.getText(), scope); final TreeClassChooser chooser = factory.createNoInnerClassesScopeChooser(IntelliLangBundle.message("dialog.title.select.annotation.class"), scope, new ClassFilter() { @Override public boolean isAccepted(PsiClass aClass) { return aClass.isAnnotationType(); } }, aClass); chooser.showDialog(); final PsiClass psiClass = chooser.getSelected(); if (psiClass != null) { myField.setText(psiClass.getQualifiedName()); } }