Bug 123946 [quick assist] "Add keyword 'final' to all unchanged variables and properties"
This function can be provide with the "Format" function
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java
buf.append("        }\n");
		buf.append("        k++;\n");
		buf.append("    }\n");
		buf.append("}\n");
		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
		
		StringBuffer selection= new StringBuffer();
		selection.append("            System.out.println(v);\n");
		selection.append("            System.out.println(k);\n");
		
		AssistContext context= getCorrectionContext(cu, buf.toString().indexOf(selection.toString()), selection.toString().length());
		List proposals= collectAssists(context, false);
		
		assertNumberOfProposals(proposals, 10);
		assertCorrectLabels(proposals);
		StringBuffer expected1= new StringBuffer();
		expected1.append("package test1;\n");
		expected1.append("public class E {\n");
		expected1.append("    public void foo() {\n");
		expected1.append("        final int k = 0, v = 0;\n");
		expected1.append("        {\n");
		expected1.append("            Runnable runnable = new Runnable() {\n");
		expected1.append("                public void run() {\n");
		expected1.append("                    System.out.println(v);\n");
		expected1.append("                    System.out.println(k);\n");
		expected1.append("                }\n");
		expected1.append("            };\n");
		expected1.append("        }\n");
		expected1.append("        k++;\n");
		expected1.append("    }\n");