diff --git a/src/com/millennialmedia/intellibot/psi/ref/RobotFileManager.java b/src/com/millennialmedia/intellibot/psi/ref/RobotFileManager.java index ed4a24d..3dff248 100644 --- a/src/com/millennialmedia/intellibot/psi/ref/RobotFileManager.java +++ b/src/com/millennialmedia/intellibot/psi/ref/RobotFileManager.java @@ -9,6 +9,7 @@ import com.intellij.psi.search.FilenameIndex; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.ProjectScope; +import com.intellij.psi.util.QualifiedName; import com.jetbrains.python.psi.PyFile; import com.jetbrains.python.psi.stubs.PyModuleNameIndex; import com.millennialmedia.intellibot.ide.config.RobotOptionsProvider; @@ -84,8 +85,12 @@ public static PsiElement findPython(@Nullable String library, @NotNull Project p addToCache(result, library); return result; } - debug(library, "Attemping module search", project); - List results = PyModuleNameIndex.find(library, project, true); + debug(library, "Attempting module search", project); + List results = PyModuleNameIndex.findByQualifiedName( + QualifiedName.fromDottedString(library), + project, + GlobalSearchScope.projectScope(project) + ); if (! results.isEmpty()) { result = (PsiFile)results.get(0); addToCache(result, library);