boolean (PsiElement psiElement, PsiDirectory[] directoriesToMove) { for (PsiDirectory directory : directoriesToMove) { if (PsiTreeUtil.isAncestor(directory, psiElement, true)) { return true; } } return false; }