boolean (boolean fromUpdate, PsiElement... elements) { if (fromUpdate && elements.length > 0 && elements[0] instanceof PsiDirectory) return true; return convertToTopLevelClasses(elements, fromUpdate, null, null) != null; }