Collection<IndexableIteratorBuilder> (@NotNull Project project) { if (filesFromIndexableSetContributors.isEmpty()) { return Collections.emptyList(); } List<IndexableIteratorBuilder> result = new ArrayList<>(); for (IndexableSetContributor contributor : IndexableSetContributor.EP_NAME.getExtensionList()) { Set<VirtualFile> applicationRoots = collectAndRemoveFilesUnder(filesFromIndexableSetContributors, contributor.getAdditionalRootsToIndex()); Set<VirtualFile> projectRoots = collectAndRemoveFilesUnder(filesFromIndexableSetContributors, contributor.getAdditionalProjectRootsToIndex(project)); if (!applicationRoots.isEmpty()) { result.add( new IndexableSetContributorFilesIteratorBuilder(null, contributor.getDebugName(), applicationRoots, false, contributor)); } if (!projectRoots.isEmpty()) { result.add(new IndexableSetContributorFilesIteratorBuilder(null, contributor.getDebugName(), projectRoots, true, contributor)); } if (filesFromIndexableSetContributors.isEmpty()) { break; } } return result; }