| Summary: | [typing] foreach statements that aren't followed by braced blocks mess up indentation | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | rezecib Mising name <rezecib> |
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert |
| Version: | 3.8 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 348198 *** |
Build Identifier: I20110613-1736 Indentation does not work properly after one-line (no-brace) foreach statements. Example code: public class Bork { public static void method() { int sum = 0; int[][] grid = new int[9][9]; for(int r = 0; r < 9; r++) for(int c = 0; c < 9; c++) sum++; sum = 0; for(int[] row : grid) for(int el : row) sum++; sum = 0; } } Reproducible: Always Steps to Reproduce: 1.Write a foreach statement 2.Fill its block with only one statement, and don't use braces 3.Hit enter and type another statement