Project: JDT
Bug 44753 Extract Local Variable also on ExpressionStatements [refactoring]
Reported: 2003-10-13 09:52:09 | Status: verified fixed

Typing : System.out.println(new String()); select 'new String()' and apply ELV , works. Typing : new String() Select 'new String()' and apply ELV , does not work - error is "An expression must be selected to activate this refactoring" I'm reasonably sure "new String();" is an expresssion and can serve as an RHS. I even checked with IDEA, and we seem to agree :-)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test82_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test82_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractTempTests.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/Util.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java