GlobalSearchScope () { final Project project = myProject; return ReadAction.compute(() -> { synchronized (myLock) { if (myCompilationPhase) { return GlobalSearchScope.allScope(project); } if (project.isDisposed()) throw new ProcessCanceledException(); return CachedValuesManager.getManager(project).getCachedValue(this, () -> CachedValueProvider.Result .create(calculateDirtyScope(), PsiModificationTracker.MODIFICATION_COUNT, VirtualFileManager.getInstance(), myModificationTracker)); } }); }