Project: JDT
Bug 128843 [quick assist] make enablement of 'Change statement <-> block' more predictable
Reported: 2006-02-21 11:58:52 | Status: resolved fixed

I20060217-1115 The quick assists should be enabled when the caret is - in a keyword (if, else, do, while, for) - in the condition - inside a block with a single statement (but not inside the statement itself) if (true) { // "Change 'if' block to statement" should be enabled here System.out.println("Hello" /*but not here*/ ); } All those quick assists should be enabled which can really change the code. Also consider "if ... else if ... else if ... else " sequences and offer to: - convert all to blocks (unless they are all blocks) - convert all to statements (unless they are all statements) - convert the node at caret position to the other form

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ControlStatementsFix.java