FileIndexesValuesApplier (@Nullable Project project, @NotNull CachedFileContent content, @Nullable FileType cachedFileType, @NotNull FileIndexingStamp indexingStamp) { ProgressManager.checkCanceled(); VirtualFile file = content.getVirtualFile(); final int fileId = getFileId(file); ApplicationMode applicationMode = getIndexApplicationMode(); boolean isValid = file.isValid(); // If the file was scheduled for update due to vfs events, then it is present in myFilesToUpdate. // In this case, we consider that current indexing (out of roots backed CacheUpdater) will cover its content if (file.isValid() && content.getTimeStamp() != file.getTimeStamp()) { content = new CachedFileContent(file); } if (isPendingDeletionFileAppearedInIndexableFilter(fileId, file)) { file = ((DeletedVirtualFileStub)file).getOriginalFile(); assert file != null; content = new CachedFileContent(file); isValid = file.isValid(); dropNontrivialIndexedStates(fileId); cachedFileType = file.getFileType(); } FileIndexesValuesApplier applier; if (!isValid || isTooLarge(file)) { ProgressManager.checkCanceled(); applier = new FileIndexesValuesApplier(this, fileId, file, indexingStamp, Collections.emptyList(), Collections.emptyList(), true, true, applicationMode, cachedFileType == null ? file.getFileType() : cachedFileType, false); } else { applier = doIndexFileContent(project, content, cachedFileType, applicationMode, indexingStamp); } return applier; }