enable reassign variable in anonymous class call (parent expression exists)

This commit is contained in:
anna
2011-03-21 12:57:31 +01:00
parent 7a4b3616c6
commit e4c7048698
@@ -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;
}
}