EA-47245 - assert: FileManagerImpl.getCachedPsiFile

This commit is contained in:
Anna Kozlova
2013-06-21 12:25:16 +04:00
parent 03878f2d3f
commit 66ec8b0b50
@@ -63,13 +63,18 @@ public class SchemaDefinitionsSearch implements QueryExecutor<PsiElement, PsiEle
});
if (infos != null && ! infos.isEmpty()) {
XmlFile file = XmlUtil.getContainingFile(xml);
final XmlFile file = XmlUtil.getContainingFile(xml);
final Project project = file.getProject();
final Module module = ModuleUtil.findModuleForPsiElement(queryParameters);
//if (module == null) return false;
final VirtualFile vf = file.getVirtualFile();
String thisNs = XmlNamespaceIndex.getNamespace(vf, project, file);
String thisNs = ApplicationManager.getApplication().runReadAction(new Computable<String>() {
@Override
public String compute() {
return XmlNamespaceIndex.getNamespace(vf, project, file);
}
});
thisNs = thisNs == null ? getDefaultNs(file) : thisNs;
// so thisNs can be null
if (thisNs == null) return false;