PsiClass (Collection<? extends PsiClass> classes, PsiClass firstClass) { if (firstClass instanceof PsiAnonymousClass && !PropertiesComponent.getInstance().getBoolean(PRESELECT_ANONYMOUS, true)) { for (PsiClass aClass : classes) { if (!(aClass instanceof PsiAnonymousClass)) { return aClass; } } } return null; }