boolean (PsiElement psiElement, PsiElement[] sources) { if (isPackageOrDirectory(psiElement)) return true; boolean areAllClasses = true; for (PsiElement source : sources) { areAllClasses &= !isPackageOrDirectory(source) && !invalid4Move(source); } return areAllClasses && psiElement instanceof PsiClass; }