Fix formatting on generated items

pdt-eg/Core-Plugin#64

Inspired by PDT ASTRewriteFormatter class