mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
enable reassign variable in anonymous class call (parent expression exists)
This commit is contained in:
+6
-4
@@ -364,11 +364,13 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
|
||||
LOG.debug("expression:" + expr);
|
||||
}
|
||||
|
||||
if (expr == null) {
|
||||
if (expr == null || !expr.isPhysical()) {
|
||||
if (ReassignVariableUtil.reassign(editor)) return false;
|
||||
String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("selected.block.should.represent.an.expression"));
|
||||
showErrorMessage(project, editor, message);
|
||||
return false;
|
||||
if (expr == null) {
|
||||
String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("selected.block.should.represent.an.expression"));
|
||||
showErrorMessage(project, editor, message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user