mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-11879 Refactor: Rename: references in ivar directive are not updated
This commit is contained in:
@@ -19,7 +19,6 @@ import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.psi.AbstractElementManipulator;
|
||||
import com.jetbrains.python.PythonStringUtil;
|
||||
import com.jetbrains.python.psi.PyElementGenerator;
|
||||
|
||||
/**
|
||||
* @author traff
|
||||
@@ -34,9 +33,8 @@ public class PyStringLiteralExpressionManipulator extends AbstractElementManipul
|
||||
}
|
||||
|
||||
String newName = range.replace(element.getText(), newContent);
|
||||
|
||||
return (PyStringLiteralExpressionImpl)element
|
||||
.replace(PyElementGenerator.getInstance(element.getProject()).createStringLiteralAlreadyEscaped(newName));
|
||||
element.updateText(newName);
|
||||
return element;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class SomeClass(object):
|
||||
""" Awesome class
|
||||
|
||||
@ivar someVar: great stuff
|
||||
@type someVar: string
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.some<caret>Var = None
|
||||
@@ -0,0 +1,9 @@
|
||||
class SomeClass(object):
|
||||
""" Awesome class
|
||||
|
||||
@ivar bar: great stuff
|
||||
@type bar: string
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.bar = None
|
||||
@@ -195,6 +195,11 @@ public class PyRenameTest extends PyTestCase {
|
||||
doMultiFileTest("bar");
|
||||
}
|
||||
|
||||
// PY-11879
|
||||
public void testDocstringParams() {
|
||||
doTest("bar");
|
||||
}
|
||||
|
||||
private void doRenameConflictTest(String newName, String expectedConflict) {
|
||||
myFixture.configureByFile(RENAME_DATA_PATH + getTestName(true) + ".py");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user