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
assertTrue("Cannot find if statement", statements.get(3) instanceof IfStatement);
			
			IfStatement ifStatement= (IfStatement) statements.get(3);
			
			Statement insertNodeForCopy1= (Statement) rewrite.createCopy((ASTNode) statements.get(1));
			Statement insertNodeForCopy2= (Statement) rewrite.createCopy((ASTNode) statements.get(2));
			
			Block whileBody= ast.newBlock();
			
			WhileStatement whileStatement= ast.newWhileStatement();
			whileStatement.setExpression(ast.newBooleanLiteral(true));
			whileStatement.setBody(whileBody);
			
			List whileBodyStatements= whileBody.statements();
			whileBodyStatements.add(insertNodeForCopy2);
			
			
			assertTrue("if statement body not a block", ifStatement.getThenStatement() instanceof Block);
			
			List ifBodyStatements= ((Block)ifStatement.getThenStatement()).statements();
			
			ifBodyStatements.add(0, whileStatement);
			ifBodyStatements.add(1, insertNodeForCopy1);
			
			rewrite.markAsInserted(whileStatement);
			rewrite.markAsInserted(insertNodeForCopy1);
			
			rewrite.markAsRemoved((ASTNode) statements.get(1));
			rewrite.markAsRemoved((ASTNode) statements.get(2));