boolean (PsiElement place, PsiElement[] elementsToMove) { for (PsiElement element : elementsToMove) { if (element instanceof PsiClass) { if (PsiTreeUtil.isAncestor(element, place, false)) return true; } } return false; }