mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed IntellijIdeaRulezzz in completion of qualified references in target expressions (PY-6829)
This commit is contained in:
@@ -253,6 +253,10 @@ public class PyQualifiedReference extends PyReferenceImpl {
|
||||
if (qualifier instanceof PyQualifiedExpression) {
|
||||
Collection<PyExpression> attrs = collectAssignedAttributes((PyQualifiedExpression)qualifier);
|
||||
for (PyExpression ex : attrs) {
|
||||
final String name = ex.getName();
|
||||
if (name != null && name.endsWith(CompletionUtil.DUMMY_IDENTIFIER_TRIMMED)) {
|
||||
continue;
|
||||
}
|
||||
if (ex instanceof PsiNamedElement && qualifierType instanceof PyClassType) {
|
||||
variants.add(LookupElementBuilder.create((PsiNamedElement)ex)
|
||||
.withTypeText(qualifierType.getName())
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
foo = dict()
|
||||
foo.Intelli = 2
|
||||
@@ -0,0 +1,2 @@
|
||||
foo = dict()
|
||||
foo.Intelli<caret> = 2
|
||||
@@ -568,4 +568,9 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
public void testFromNamespacePackageImport() {
|
||||
doMultiFileTest();
|
||||
}
|
||||
|
||||
// PY-6829
|
||||
public void testFakeNameInQualifiedReference() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user