void (ActionEvent e) { TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createWithInnerClassesScopeChooser(myChooserTitle, GlobalSearchScope.projectScope(myProject), new ClassFilter() { @Override public boolean isAccepted(PsiClass aClass) { return aClass.getParent() instanceof PsiJavaFile || aClass.hasModifierProperty(PsiModifier.STATIC); } }, null); if (mySelectedClass != null) { chooser.selectDirectory(mySelectedClass.getContainingFile().getContainingDirectory()); } chooser.showDialog(); mySelectedClass = chooser.getSelected(); if (mySelectedClass != null) { setText(mySelectedClass.getQualifiedName()); } }