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/AssistQuickFixTest.java
buf= new StringBuffer();
				buf.append("package test1;\n");
				buf.append("public class E {\n");
				buf.append("    private Class fClass;\n");
				buf.append("    public void foo() {\n");
				buf.append("        fClass = getClass();\n");
				buf.append("    }\n");
				buf.append("}\n");
				assertEqualString(preview, buf.toString());
				
				Point selection= proposal.getSelection(new Document(preview));
				assertEquals("wrong selection", "fClass", preview.substring(selection.x, selection.x + selection.y));	
			} else if (proposal.getVariableKind() == AssignToVariableAssistProposal.LOCAL) {
				assertTrue("same proposal kind", doLocal);
				doLocal= false;
				String preview= proposal.getCompilationUnitChange().getPreviewContent();
		
				buf= new StringBuffer();
				buf.append("package test1;\n");
				buf.append("public class E {\n");
				buf.append("    public void foo() {\n");
				buf.append("        Class c = getClass();\n");
				buf.append("    }\n");
				buf.append("}\n");
				assertEqualString(preview, buf.toString());
				
				Point selection= proposal.getSelection(new Document(preview));
				assertEquals("wrong selection", "c", preview.substring(selection.x, selection.x + selection.y));	
			}
		}