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/ASTRewritingTypeDeclTest.java
assertTrue("Cannot find inner class", members.get(0) instanceof TypeDeclaration);
			TypeDeclaration innerType= (TypeDeclaration) members.get(0);
/*		bug 22161
			SimpleName newSuperclass= ast.newSimpleName("Exception");
			innerType.setSuperclass(newSuperclass);
			rewrite.markAsInserted(newSuperclass);
*/
			FieldDeclaration newField= createNewField(ast, "fCount");
			
			List innerMembers= innerType.bodyDeclarations();
			innerMembers.add(0, newField);
			
			rewrite.markAsInserted(newField);
			
			MethodDeclaration newMethodDecl= createNewMethod(ast, "newMethod", false);
			members.add(4, newMethodDecl);
			
			rewrite.markAsInserted(newMethodDecl);
		}
		{ 
			TypeDeclaration type= findTypeDeclaration(astRoot, "F");
			
			SimpleName newSuperclass= ast.newSimpleName("Exception");
			type.setSuperclass(newSuperclass);
			
			rewrite.markAsInserted(newSuperclass);
			
			List members= type.bodyDeclarations();