@Override
  public @Nullable String select(@NotNull Project project) {
    //wait for loading
    if (project.isDefault() || DumbService.isDumb(project)) {
      return null;
    }

    String title = myTitle != null ? myTitle :
                   myAnnotationOnly ?
                   JavaBundle.message("special.annotations.list.annotation.class") :
                   JavaBundle.message("dialog.title.choose.class");
    TreeClassChooser chooser = TreeClassChooserFactory.getInstance(project)
      .createWithInnerClassesScopeChooser(title, GlobalSearchScope.allScope(project), new ClassFilter() {
        @Override
        public boolean isAccepted(PsiClass aClass) {
          return checkClass(aClass) == null;
        }
      }, null);
    chooser.showDialog();
    final PsiClass selected = chooser.getSelected();
    return selected == null ? null : selected.getQualifiedName();
  }
@Override
  public @Nullable String select(@NotNull Project project)