Project: JDT
Bug 117053 [ast rewriter] Incorrect indenting after inline method
Reported: 2005-11-18 10:38:04 | Status: resolved fixed

Build: I20051115 1) Start with this code: void foo(int x) { if (x++ < 6) x++; } void bar() { int x = 2; if (x < 10) x++; else foo(x); } 2) After a refactor > inline of foo(), the result is: void bar() { int x = 2; if (x < 10) x++; else if (x++ < 6) x++; } Note the inlined if statement is incorrectly indented (with default formatter settings).

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/bugs_in/Test_117053.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/bugs_out/Test_117053.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java