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