From c4666d7c1fe8fabf39ff31d9261c4a3336443e79 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Wed, 22 Aug 2012 18:51:40 +0400 Subject: [PATCH] can't guess schema in dumb mode --- xml/impl/src/com/intellij/xml/index/XmlNamespaceIndex.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xml/impl/src/com/intellij/xml/index/XmlNamespaceIndex.java b/xml/impl/src/com/intellij/xml/index/XmlNamespaceIndex.java index 6d681d5d32ff..6268ccededad 100644 --- a/xml/impl/src/com/intellij/xml/index/XmlNamespaceIndex.java +++ b/xml/impl/src/com/intellij/xml/index/XmlNamespaceIndex.java @@ -17,6 +17,7 @@ package com.intellij.xml.index; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtilCore; +import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; @@ -158,6 +159,8 @@ public class XmlNamespaceIndex extends XmlIndex { @Nullable final String version, @NotNull PsiFile file) { + if (DumbService.isDumb(file.getProject())) return null; + IndexedRelevantResource resource = guessSchema(namespace, tagName, version, ModuleUtilCore.findModuleForPsiElement(file)); if (resource == null) return null;