An approach is using code formatter tools after code generation.
I found jalopy and eclipse code formatter can do this job well.
But jalopy is big (>1.2M, include swing gui tool) and eclispe code formattor embbedded any eclipse module code, I don't know can we use it in the code.