boolean (Map<PsiFile, PsiClass[]> classes, PsiElement[] elements) { if (classes.size() == 1 && !(elements.length == 1 && elements[0] instanceof PsiDirectory)) { final PsiClass[] psiClasses = classes.values().iterator().next(); return psiClasses != null && psiClasses.length == 1; } return false; }