Project: JDT
Bug 110599 [quick assist] 'convert to enhanced for loop' removes comment
Reported: 2005-09-26 10:43:12 | Status: resolved fixed

M20050923-1430 The 'convert to enhanced for loop' quick assist removes comments before the loop. It shouldn't. void m(String[] strings) { //comment stays //comment will be removed for (int i = 0; i < strings.length; i++) { System.out.println(strings[i]); } //comment stays }

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ConvertForLoopQuickFixTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ConvertIterableLoopQuickFixTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertForLoopOperation.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java