Bug 25152 Code format too tight when creating a missing method [code manipulation]
When you choose the quick fix 'create method', the code generated butts up below the method without a new line: } /** * Method precompile. */ private void precompile() { } instead of: } /** * Method precompile. */ private void precompile() { }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedVariablesQuickFixTest.java
ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
		
		CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);
		IProblem[] problems= astRoot.getProblems();
		assertNumberOf("problems", problems.length, 1);
		
		CorrectionContext context= getCorrectionContext(cu, problems[0]);
		assertCorrectContext(context);
		ArrayList proposals= new ArrayList();
		
		JavaCorrectionProcessor.collectCorrections(context,  proposals);
		assertNumberOf("proposals", proposals.size(), 3);
		assertCorrectLabels(proposals);
		
		boolean doField= true, doParam= true, doLocal= true;
		for (int i= 0; i < proposals.size(); i++) {
			NewVariableCompletionProposal proposal= (NewVariableCompletionProposal) proposals.get(i);
			String preview= proposal.getCompilationUnitChange().getPreviewContent();
			if (proposal.getVariableKind() == NewVariableCompletionProposal.FIELD) {
				assertTrue("2 field proposals", doField);
				doField= false;
				
				buf= new StringBuffer();
				buf.append("package test1;\n");
				buf.append("public class E {\n");
				buf.append("    private int i;\n");				
				buf.append("    void foo() {\n");
				buf.append("        for (i= 0;;) {\n");
				buf.append("        }\n");		
				buf.append("    }\n");