Collection<UnloadedModuleDescription> () { Project project = getProject(); ModuleManager moduleManager = ModuleManager.getInstance(Objects.requireNonNull(project)); return myRootModules .stream() .flatMap(module -> DirectoryIndex.getInstance(project).getDependentUnloadedModules(module).stream()) .map(moduleManager::getUnloadedModuleDescription) .filter(Objects::nonNull) .collect(Collectors.toList()); }