Bug 129530 [quick fix] remove curly brackets should have least relevance
20060227 Using quick fix on the 'for' of public class A { void f(List<? extends Number> x){ for (Iterator<? extends Number> iter = x.iterator(); iter.hasNext();) { Number num = iter.next(); //do stuff }} } has 'remove curly brackets' as first option. It should always be last (or second last in this example)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
Block replacingBody2= ast.newBlock();
				replacingBody2.statements().add(childPlaceholder2);
				rewrite.set(ifStatement, IfStatement.ELSE_STATEMENT_PROPERTY, replacingBody2, null);
				if (elseStatment != child) {
					missingBlockFound= true;
				}
			}
			if (missingBlockFound && foundElse) {
				String label = CorrectionMessages.QuickAssistProcessor_replacethenelsewithblock_description;
				Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
				ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 10, image);
				resultingCollections.add(proposal);
			}
		}
		return true;
	}
	
	private static boolean getSurroundWithRunnableProposal(IInvocationContext context, ASTNode node, ArrayList resultingCollections) throws CoreException {
		Statement[] selectedStatements= SurroundWith.getSelectedStatements(context);
		if (selectedStatements == null)
			return false;
		
		if (resultingCollections == null)
			return true;
		
		String label= CorrectionMessages.QuickAssistProcessor_surround_with_runnable;
		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
		
		SurroundWithRunnableProposal proposal= new SurroundWithRunnableProposal(label, context, 10, image, selectedStatements);