com.jetbrains.python.psi.resolve.RatedResolveResult



API Populatity

1 Client projects

Project: com.jetbrains

Project JetBrains/intellij-community in file ....python.psi.impl.references.PyImportReference.java (2012-08-08)
@@ -17,10 +17,7 @@ import com.jetbrains.python.PyTokenTypes;
 import com.jetbrains.python.psi.*;
 import com.jetbrains.python.psi.impl.PyQualifiedName;
 import com.jetbrains.python.psi.impl.PyReferenceExpressionImpl;
-import com.jetbrains.python.psi.resolve.PyResolveContext;
-import com.jetbrains.python.psi.resolve.QualifiedNameResolver;
-import com.jetbrains.python.psi.resolve.RatedResolveResult;
-import com.jetbrains.python.psi.resolve.ResolveImportUtil;
+import com.jetbrains.python.psi.resolve.*;
 import com.jetbrains.python.psi.types.PyModuleType;
 import com.jetbrains.python.psi.types.PyType;
 import com.jetbrains.python.psi.types.TypeEvalContext;
@@ -249,7 +246,7 @@ public class PyImportReference extends PyReferenceImpl {
     }
 
     private void fillFromQName(PyQualifiedName thisQName, InsertHandler<LookupElement> insertHandler) {
-      QualifiedNameResolver visitor = new QualifiedNameResolver(thisQName).fromElement(myCurrentFile);
+      QualifiedNameResolver visitor = new QualifiedNameResolverImpl(thisQName).fromElement(myCurrentFile);
       for (PsiDirectory dir : visitor.resultsOfType(PsiDirectory.class)) {
         fillFromDir(dir, insertHandler);
       }
Project JetBrains/intellij-community in file ...om.jetbrains.python.psi.types.PyClassLikeType.java (2013-04-25)
@@ -1,5 +1,9 @@
 package com.jetbrains.python.psi.types;
 
+import com.jetbrains.python.psi.AccessDirection;
+import com.jetbrains.python.psi.PyExpression;
+import com.jetbrains.python.psi.resolve.PyResolveContext;
+import com.jetbrains.python.psi.resolve.RatedResolveResult;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -19,5 +23,9 @@ public interface PyClassLikeType extends PyCallableType {
   @NotNull
   List<PyClassLikeType> getSuperClassTypes(@NotNull TypeEvalContext context);
 
+  @Nullable
+  List<? extends RatedResolveResult> resolveMember(@NotNull final String name, @Nullable PyExpression location, AccessDirection direction,
+                                                   PyResolveContext resolveContext, boolean inherited);
+
   boolean isValid();
 }
Project JetBrains/intellij-community in file ....src.com.jetbrains.python.psi.impl.PyFileImpl.java (2012-04-03)
@@ -22,6 +22,7 @@ import com.jetbrains.python.*;
 import com.jetbrains.python.codeInsight.controlflow.ControlFlowCache;
 import com.jetbrains.python.inspections.PythonVisitorFilter;
 import com.jetbrains.python.psi.*;
+import com.jetbrains.python.psi.resolve.RatedResolveResult;
 import com.jetbrains.python.psi.resolve.ResolveImportUtil;
 import com.jetbrains.python.psi.resolve.VariantsProcessor;
 import com.jetbrains.python.psi.stubs.PyFileStub;
@@ -573,9 +574,9 @@ public class PyFileImpl extends PsiFileBase implements PyFile, PyExpression {
     final PyQualifiedName qName = importElement.getImportedQName();
     // http://stackoverflow.com/questions/6048786/from-module-import-in-init-py-makes-module-name-visible
     if (qName != null && qName.getComponentCount() > 1 && name.equals(qName.getLastComponent()) && PyNames.INIT_DOT_PY.equals(getName())) {
-      final List<PsiElement> elements = ResolveImportUtil.resolveNameInImportStatement(importElement, qName.removeLastComponent());
-      for (PsiElement element : elements) {
-        if (PyUtil.turnDirIntoInit(element) == this) {
+      final List<? extends RatedResolveResult> elements = ResolveImportUtil.resolveNameInImportStatement(importElement, qName.removeLastComponent());
+      for (RatedResolveResult element: elements) {
+        if (PyUtil.turnDirIntoInit(element.getElement()) == this) {
           return importElement;
         }
       }