mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-8128 Change Signature: signature for child method is not updated when changing method name
This commit is contained in:
+1
-2
@@ -232,8 +232,7 @@ public class PyChangeSignatureUsageProcessor implements ChangeSignatureUsageProc
|
||||
updateParameterList(changeInfo, function);
|
||||
}
|
||||
if (changeInfo.isNameChanged()) {
|
||||
final PsiElement method = changeInfo.getMethod();
|
||||
RenameUtil.doRenameGenericNamedElement(method, changeInfo.getNewName(), UsageInfo.EMPTY_ARRAY, null);
|
||||
RenameUtil.doRenameGenericNamedElement(function, changeInfo.getNewName(), UsageInfo.EMPTY_ARRAY, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
class A(object):
|
||||
def m1(self):
|
||||
print(1)
|
||||
|
||||
|
||||
class B(A):
|
||||
def m1(self):
|
||||
print(2)
|
||||
@@ -0,0 +1,8 @@
|
||||
class A(object):
|
||||
def m<caret>(self):
|
||||
print(1)
|
||||
|
||||
|
||||
class B(A):
|
||||
def m(self):
|
||||
print(2)
|
||||
+4
@@ -87,6 +87,10 @@ public class PyChangeSignatureTest extends PyTestCase {
|
||||
new PyParameterInfo(-1, "a", "2", false)), LanguageLevel.PYTHON32);
|
||||
}
|
||||
|
||||
public void testRenameOverriding() {
|
||||
doChangeSignatureTest("m1", Arrays.asList(new PyParameterInfo(0, "self", null, false)));
|
||||
}
|
||||
|
||||
public void testEmptyParameterName() {
|
||||
doValidationTest(null, Arrays.asList(new PyParameterInfo(-1, "", "2", true)),
|
||||
PyBundle.message("refactoring.change.signature.dialog.validation.parameter.name"));
|
||||
|
||||
Reference in New Issue
Block a user