From 82f14358db1e6f4843cb1279e2ed164a6c396bc4 Mon Sep 17 00:00:00 2001 From: "Andrei.Kuznetsov" Date: Mon, 13 Jan 2025 15:18:27 +0100 Subject: [PATCH] IJPL-174027: restore previous behavior: index all files from all projects if project==null when invoking ensureUpToDate Behavior changed unintentionally. Problem found during code review. (cherry picked from commit 7424552ccbc568d2ddfb22570c2db479df624821) IJ-CR-152316 GitOrigin-RevId: 4015ebbac27103eda06d8707882071a3394a37a5 --- .../src/com/intellij/util/indexing/FileBasedIndexImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index 2dbd2b805d2b..b85c3c7022f2 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -857,8 +857,9 @@ public final class FileBasedIndexImpl extends FileBasedIndexEx { boolean includeFilesFromOtherProjects = restrictedFile == null && project == null; ProjectFilesCondition projectFilterCondition = new ProjectFilesCondition( projectIndexableFiles(project), - // Index everything for performance reasons: unindexed project files will trigger "indexUnsavedDocument" too often - project == null ? GlobalSearchScope.EMPTY_SCOPE : GlobalSearchScope.everythingScope(project), + // TODO: index changed documents from other projects too for performance reasons: changed documents will break + // fast check (myUpToDateIndicesForUnsavedOrTransactedDocuments) in indexUnsavedDocument + project == null ? null : GlobalSearchScope.everythingScope(project), restrictedFile, includeFilesFromOtherProjects);