| Summary: | [quick assist] "Convert to enhanced for loop" isn't available for loops over array with prefix increment | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dmitry Matveev <dmitriy.g.matveev> |
| Component: | UI | Assignee: | Deepak Azad <deepakazad> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.7 | ||
| Target Milestone: | 3.8 M3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Fix to go in org.eclipse.jdt.internal.corext.fix.ConvertForLoopOperation.validateUpdaters(ForStatement) Fixed in HEAD. Commit - a5cb166bdf05e661f28b4234df6cdddde7912634 |
Build Identifier: M20110210-1200 public static void main(String[] args) { for (int i = 0; i < args.length; ++i) { // "Convert to enhanced for loop" refactoring should be available on this line String arg = args[i]; System.out.println(arg); } for (int i = 0; i < args.length; ++i) { String arg = args[i]; System.out.println(arg); } } Reproducible: Always Steps to Reproduce: 1. Paste example function to some class. 2. Open suggestion window on for loop header (Ctrl-1). 3. Expected: "Convert to enhanced for loop" command is in list of suggestions, actual: It isn't.