Community
Participate
Working Groups
Build Identifier: 20110526-1053 After an enhanced for-loop with a single statement, the next line is indented wrong: for (Integer id : ids) process(id); int nextLine; Also see Bug 331028, as it may be related. Reproducible: Always Steps to Reproduce: 1. Type the two-line for loop 2. Enter another line, Press Ctrl-I to indent. 3. Not profit.
Created attachment 197391 [details] Fix with additional test
Committed to BETA_JAVA7 branch.
It doesn't affect only the next line, but all following lines (until a closing brace). It also affects lines after a single-line loop like for (Integer id : ids) process(id); int nextLine; int nextLine2; It also happens during Save Actions, thus making version control unusable.
.
Adding [1.7] so we find it easier. All fixed [1.7] bugs in BETA_JAVA7 will go into 3.7.1.
Verified using JDT feature patch v20110714-1300.
*** Bug 354324 has been marked as a duplicate of this bug. ***