boolean (PsiDirectory @NotNull [] directories, @NotNull String packageName, boolean anyFile) { if (anyFile) { return !ContainerUtil.exists(directories, dir -> dir.getFiles().length > 0); } else { return PsiUtil.isPackageEmpty(directories, packageName); } }