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
private static boolean getExtractLocalProposal(IInvocationContext context, ASTNode covering, ArrayList proposals) throws CoreException {
		ASTNode node= context.getCoveredNode();
		
		if (!(node instanceof Expression)) {
			return false;
		}
		final Expression expression= (Expression) node;
		
		ITypeBinding binding= expression.resolveTypeBinding();
		if (binding == null || Bindings.isVoidType(binding)) {
			return false;
		}
		if (proposals == null) {
			return true;
		}
		final ICompilationUnit cu= context.getCompilationUnit();
		final ExtractTempRefactoring refactoring= new ExtractTempRefactoring(cu, expression.getStartPosition(), expression.getLength());
		if (refactoring.checkActivationBasics(context.getASTRoot(), new NullProgressMonitor()).isOK()) {
			String label= CorrectionMessages.QuickAssistProcessor_extract_to_local_description;
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);
			CUCorrectionProposal proposal= new CUCorrectionProposal(label, cu, 5, image) {
				protected TextChange createTextChange() throws CoreException {
					refactoring.setTempName(refactoring.guessTempName());
					if (!refactoring.checkFinalConditions(new NullProgressMonitor()).hasFatalError()) {
						return (TextChange) refactoring.createChange(new NullProgressMonitor());
					} else {
						Document document= new Document(""); 
						document.setInitialLineDelimiter(StubUtility.getLineDelimiterUsed(cu));
						return new DocumentChange(getDisplayString(), document);