void (AnActionButton button) { Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext(injectionList)); if (project == null) project = ProjectManager.getInstance().getDefaultProject(); TreeClassChooser chooser = TreeClassChooserFactory.getInstance(project) .createWithInnerClassesScopeChooser(JavaBundle.message("special.annotations.list.annotation.class"), GlobalSearchScope.allScope(project), new ClassFilter() { @Override public boolean isAccepted(PsiClass aClass) { return isApplicable.test(aClass); } }, null); chooser.showDialog(); final PsiClass selected = chooser.getSelected(); if (selected != null) { listModel.add(selected.getQualifiedName()); } }