mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce variable from polyadic expression: ensure that selected expr would be replaced
This commit is contained in:
+4
@@ -752,6 +752,10 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
|
||||
}
|
||||
}
|
||||
|
||||
if (!deleteSelf && replaceSelf && expr1 instanceof PsiPolyadicExpression && expr1.isValid() && !expr1.isPhysical() ) {
|
||||
array.add(replace(expr1, ref, project));
|
||||
}
|
||||
|
||||
if (editor != null) {
|
||||
final PsiElement[] replacedOccurences = PsiUtilBase.toPsiElementArray(array);
|
||||
highlightReplacedOccurences(project, editor, replacedOccurences);
|
||||
|
||||
Reference in New Issue
Block a user