boolean (@NotNull final VirtualFile file) { ProjectFileIndex index = ProjectRootManager.getInstance(getProject()).getFileIndex(); if (!index.isInLibrary(file)) return false; return someChildContainsFile(file, false); }