Stream<VirtualFile> (Module module) { final ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module); final Stream<Module> dependencies = Arrays.stream(moduleRootManager.getDependencies()); return dependencies.flatMap(d -> Arrays.stream(ModuleRootManager.getInstance(d).getContentRoots())); }