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
if (resultingCollections == null) {
			return true;
		}
		AST ast= statement.getAST();
		ASTRewrite rewrite= ASTRewrite.create(ast);
		String label= CorrectionMessages.QuickAssistProcessor_splitdeclaration_description;
		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image);
		Statement newStatement;
		int insertIndex= list.indexOf(statement);
		Expression placeholder= (Expression) rewrite.createMoveTarget(fragment.getInitializer());
		Assignment assignment= ast.newAssignment();
		assignment.setRightHandSide(placeholder);
		assignment.setLeftHandSide(ast.newSimpleName(fragment.getName().getIdentifier()));
		if (statement instanceof VariableDeclarationStatement) {
			newStatement= ast.newExpressionStatement(assignment);
			insertIndex+= 1; 
		} else {
			rewrite.replace(fragment.getParent(), assignment, null);
			VariableDeclarationFragment newFrag= ast.newVariableDeclarationFragment();
			newFrag.setName(ast.newSimpleName(fragment.getName().getIdentifier()));
			newFrag.setExtraDimensions(fragment.getExtraDimensions());
			VariableDeclarationExpression oldVarDecl= (VariableDeclarationExpression) fragParent;
			VariableDeclarationStatement newVarDec= ast.newVariableDeclarationStatement(newFrag);
			newVarDec.setType((Type) ASTNode.copySubtree(ast, oldVarDecl.getType()));
			newVarDec.modifiers().addAll(ASTNodeFactory.newModifiers(ast, oldVarDecl.getModifiers()));
			newStatement= newVarDec;
		}
		ListRewrite listRewriter= rewrite.getListRewrite(statementParent, (ChildListPropertyDescriptor) property);
		listRewriter.insertAt(newStatement, insertIndex, null);