void (@NlsSafe String title) { final TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject) .createNoInnerClassesScopeChooser(JavaBundle.message("dialog.title.choose.annotation", title), GlobalSearchScope.allScope(myProject), new ClassFilter() { @Override public boolean isAccepted(PsiClass aClass) { return aClass.isAnnotationType() && isAnnotationAccepted(aClass); } }, null); chooser.showDialog(); final PsiClass selected = chooser.getSelected(); if (selected == null) { return; } final String qualifiedName = selected.getQualifiedName(); if (selectAnnotation(qualifiedName) == null) { addRow(qualifiedName, false); addAnnotationToCombo(qualifiedName); mySorter.sort(); Object added = selectAnnotation(qualifiedName); assert added != null; myTable.scrollRectToVisible(myTable.getCellRect((int)added, 0, true)); } }