boolean (@NotNull VirtualFile file) { Project project = Objects.requireNonNull(getProject()); ProjectFileIndex index = ProjectFileIndex.getInstance(project); return index.isInLibrary(file) && someChildContainsFile(file, false); }