mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
wait for indices in JavaFunctionalExpressionSearcher bg thread (EA-99366 - INRE: FileBasedIndexImpl.handleDumbMode)
This commit is contained in:
+4
-2
@@ -25,6 +25,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleManager;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.LanguageLevelModuleExtension;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
@@ -187,8 +188,9 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase<PsiFunct
|
||||
private static List<FunExprOccurrence> filterInapplicable(List<PsiClass> samClasses,
|
||||
VirtualFile vFile,
|
||||
Collection<FunExprOccurrence> occurrences, Project project) {
|
||||
return ReadAction.compute(() -> project.isDisposed() ? Collections.emptyList()
|
||||
: ContainerUtil.filter(occurrences, it -> it.canHaveType(samClasses, vFile)));
|
||||
return DumbService.getInstance(project).runReadActionInSmartMode(
|
||||
() -> project.isDisposed() ? Collections.emptyList()
|
||||
: ContainerUtil.filter(occurrences, it -> it.canHaveType(samClasses, vFile)));
|
||||
}
|
||||
|
||||
private static boolean processFile(@NotNull Processor<PsiFunctionalExpression> consumer,
|
||||
|
||||
Reference in New Issue
Block a user