From 0c8e03f726115060ff64337c18a0631c98ec570a Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Fri, 31 Jan 2014 14:39:10 +0400 Subject: [PATCH] Fixed add method quick fix after changing the element reported by the unresolved references inspection It was the unresolved identifier, now it's the unresolved reference expression. --- .../python/inspections/quickfix/AddMethodQuickFix.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java b/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java index f2246b11e999..30d99103b887 100644 --- a/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java +++ b/python/src/com/jetbrains/python/inspections/quickfix/AddMethodQuickFix.java @@ -67,9 +67,8 @@ public class AddMethodQuickFix implements LocalQuickFix { public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { try { - // descriptor points to the unresolved identifier // there can be no name clash, else the name would have resolved, and it hasn't. - PsiElement problem_elt = descriptor.getPsiElement().getParent(); // id -> ref expr + PsiElement problem_elt = descriptor.getPsiElement(); PyClass cls = myQualifierType.getPyClass(); boolean call_by_class = myQualifierType.isDefinition(); String item_name = myIdentifier;