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