boolean (PsiElement[] elements, PsiElement targetContainer, @Nullable PsiReference reference) { if (!super.canMove(elements, targetContainer, reference)) return false; for (PsiElement element : elements) { if (element instanceof PsiFile && ((PsiFile)element).getVirtualFile() != null && !NestingTreeStructureProvider.getFilesShownAsChildrenInProjectView(element.getProject(), ((PsiFile)element).getVirtualFile()).isEmpty()) { return true; } } return false; }