From a5491985e3d30c23a20e83a039a6131d204d96fa Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 4 Feb 2010 14:06:44 +0300 Subject: [PATCH] don't try to propose import fixes from out-of-project SDKs (PY-458) --- .../python/inspections/PyUnresolvedReferencesInspection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java b/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java index c869e40c5ef9..51c637398ced 100644 --- a/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java +++ b/python/src/com/jetbrains/python/inspections/PyUnresolvedReferencesInspection.java @@ -9,6 +9,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; import com.intellij.psi.search.GlobalSearchScope; +import com.intellij.psi.search.ProjectScope; import com.intellij.psi.stubs.StubIndex; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.Consumer; @@ -152,7 +153,7 @@ public class PyUnresolvedReferencesInspection extends LocalInspectionTool { ProgressManager.checkCanceled(); // before expensive index searches // NOTE: current indices have limitations, only finding direct definitions of classes and functions. Project project = node.getProject(); - GlobalSearchScope scope = null; // GlobalSearchScope.projectScope(project); + GlobalSearchScope scope = ProjectScope.getAllScope(project); List symbols = new ArrayList(); symbols.addAll(StubIndex.getInstance().get(PyClassNameIndex.KEY, ref_text, project, scope)); symbols.addAll(StubIndex.getInstance().get(PyFunctionNameIndex.KEY, ref_text, project, scope));