mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce refactorings: do not try to rename dependencies after newly introduced variable (EA-26587 - AIOOBE: InplaceIntroduceParameterPopup.getParameter)
This commit is contained in:
+5
@@ -169,6 +169,11 @@ public class VariableInplaceIntroducer extends VariableInplaceRenamer {
|
||||
return myExprMarker;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean performAutomaticRename() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveOffsetAfter(boolean success) {
|
||||
try {
|
||||
|
||||
+5
-1
@@ -252,7 +252,7 @@ public class VariableInplaceRenamer {
|
||||
public void beforeTemplateFinished(final TemplateState templateState, Template template) {
|
||||
finish();
|
||||
|
||||
if (snapshot != null) {
|
||||
if (snapshot != null && performAutomaticRename()) {
|
||||
TextResult value = templateState.getVariableValue(PRIMARY_VARIABLE_NAME);
|
||||
if (value != null) {
|
||||
myNewName = value.toString();
|
||||
@@ -329,6 +329,10 @@ public class VariableInplaceRenamer {
|
||||
return myElementToRename;
|
||||
}
|
||||
|
||||
protected boolean performAutomaticRename() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void moveOffsetAfter(boolean success) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user