GlobalSearchScope (@NotNull Project project) { return CachedValuesManager.getManager(project).getCachedValue(project, () -> { GlobalSearchScope scope = GlobalSearchScopesCore.projectProductionScope(project) .uniteWith(LibraryScopeCache.getInstance(project).getLibrariesOnlyScope()); Collection<VirtualFile> candidates = DomService.getInstance() .getDomFileCandidates(IdeaPlugin.class, scope); final GlobalSearchScope filesScope = GlobalSearchScope.filesWithLibrariesScope(project, candidates); return new CachedValueProvider.Result<>(filesScope, PsiModificationTracker.MODIFICATION_COUNT); }); }