mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
do not introduce from q.selection (IDEA-87461)
This commit is contained in:
+3
@@ -365,6 +365,9 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
|
||||
|
||||
final PsiReferenceExpression refExpr = PsiTreeUtil.getParentOfType(toBeExpression.findElementAt(refIdx[0]), PsiReferenceExpression.class);
|
||||
assert refExpr != null;
|
||||
if (toBeExpression == refExpr && refIdx[0] > 0) {
|
||||
return null;
|
||||
}
|
||||
if (ReplaceExpressionUtil.isNeedParenthesis(refExpr.getNode(), tempExpr.getNode())) {
|
||||
tempExpr.putCopyableUserData(NEED_PARENTHESIS, Boolean.TRUE);
|
||||
return tempExpr;
|
||||
|
||||
Reference in New Issue
Block a user