SearchScope (PsiElement element) { Project project = element.getProject(); return CachedValuesManager.getManager(project).getCachedValue(project, () -> { Collection<VirtualFile> pluginXmlFiles = DomService.getInstance().getDomFileCandidates(IdeaPlugin.class, GlobalSearchScope.allScope(project)); GlobalSearchScope scope = GlobalSearchScope.filesScope(project, pluginXmlFiles); return new CachedValueProvider.Result<>(scope, PsiModificationTracker.MODIFICATION_COUNT); }); }