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/astrewrite/ASTRewritingMoveCodeTest.java
MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
			assertTrue("Cannot find foo", methodDecl != null);
			
			List fooStatements= methodDecl.getBody().statements();
			assertTrue("Cannot find if statement", fooStatements.size() == 1);
			
			
			IfStatement ifStatement= (IfStatement) fooStatements.get(0);
			rewrite.markAsRemoved(ifStatement);
			
			ASTNode placeHolder= rewrite.createCopy(ifStatement);
			
			
			ReturnStatement returnStatement= ast.newReturnStatement();
			rewrite.markAsInserted(returnStatement);
			Block then= (Block) ifStatement.getThenStatement();
			then.statements().add(returnStatement);
	
			
			MethodDeclaration methodGoo= findMethodDeclaration(type, "goo");
			assertTrue("Cannot find goo", methodGoo != null);
			
			List gooStatements= methodGoo.getBody().statements();
			assertTrue("Cannot find statement in goo", gooStatements.size() == 1);
			
			rewrite.markAsReplaced((ASTNode) gooStatements.get(0), placeHolder);
		}	
					
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal("", cu, rewrite, 10, null);
		proposal.getCompilationUnitChange().setSave(true);