boolean (PsiFile targetFile, @NotNull PsiFileSystemItem file) { PsiDirectory parent = (PsiDirectory)file.getParent(); return parent != null && file != targetFile && (isRoot(parent) || parent == targetFile.getParent() || isPackage(parent, false, null)); }