let find in path uses Trigram & IdIndex in dumb mode as is (IDEA-225580): follow IDEA-CR-54769 (use non-blocking read action)

GitOrigin-RevId: b974ad3bb86d2688813539b831db435c993f7fc9
This commit is contained in:
Dmitry Batkovich
2019-11-15 06:33:14 +00:00
committed by intellij-monorepo-bot
parent 30792c683f
commit bf68eff84a
@@ -1058,9 +1058,9 @@ public class PsiSearchHelperImpl implements PsiSearchHelper {
Boolean[] result = {null};
if (FileBasedIndex.isIndexAccessDuringDumbModeEnabled()) {
ReadAction.run(() -> {
ReadAction.nonBlocking(() -> {
FileBasedIndex.getInstance().ignoreDumbMode(() -> result[0] = query.compute(), project);
});
}).executeSynchronously();
}
return result[0] != null ? result[0] : DumbService.getInstance(project).runReadActionInSmartMode(query);
}