FileIndexingStatistics (@NotNull VirtualFile file, @NotNull List<? extends SingleIndexValueApplier<?>> appliers, @NotNull List<SingleIndexValueRemover> removers, @NotNull FileType fileType, boolean logEmptyProvidedIndexes) { Set<ID<?, ?>> indexesProvidedByExtensions = new HashSet<>(); boolean wasFullyIndexedByInfrastructureExtension = true; Map<ID<?, ?>, Long> perIndexerEvaluatingIndexValueAppliersTimes = new HashMap<>(); for (SingleIndexValueApplier<?> applier : appliers) { perIndexerEvaluatingIndexValueAppliersTimes.put(applier.indexId, applier.evaluatingIndexValueApplierTime); if (applier.wasIndexProvidedByExtension()) { indexesProvidedByExtensions.add(applier.indexId); } else { if (myIndex.doTraceSharedIndexUpdates()) { FileBasedIndexImpl.LOG.info("shared index " + applier.indexId + " is not provided for file " + file.getName()); } wasFullyIndexedByInfrastructureExtension = false; } } Map<ID<?, ?>, Long> perIndexerEvaluatingIndexValueRemoversTimes = new HashMap<>(); for (SingleIndexValueRemover remover : removers) { perIndexerEvaluatingIndexValueRemoversTimes.put(remover.indexId, remover.evaluatingValueRemoverTime); //is not 0 only when !writeIndexSeparately } if (logEmptyProvidedIndexes && indexesProvidedByExtensions.isEmpty()) { FileBasedIndexImpl.LOG.info("no shared indexes were provided for file " + file.getName()); } final IndexesEvaluated indexesEvaluated; if (wasFullyIndexedByInfrastructureExtension && !indexesProvidedByExtensions.isEmpty()) { indexesEvaluated = IndexesEvaluated.BY_EXTENSIONS; } else if (appliers.isEmpty() && removers.isEmpty() && !removeDataFromIndicesForFile) { indexesEvaluated = IndexesEvaluated.NOTHING_TO_WRITE; } else { indexesEvaluated = IndexesEvaluated.BY_USUAL_INDEXES; } return new FileIndexingStatistics(fileType, indexesProvidedByExtensions, perIndexerEvaluatingIndexValueAppliersTimes, perIndexerEvaluatingIndexValueRemoversTimes, indexesEvaluated); }