Reputation: 2734
I'm using Java Sun Codemodel to generate java classes on the fly, and it works pretty well for me.
Now I have an additional challenge: How do I control how the code is formatted? Is there any way at all? In particular, I'd like to have all curly brackets in a new line and would like to extend the line length to let's say 130 chars.
E.g., we have a formatter that we use in Eclipse. There's no way I can just tell Codemodel to use that somehow, right?
There's this JFormatter class that kind of looks like it could be useful for something, but it doesn't look like it can do more sophisticated stuff like that.
Upvotes: 1
Views: 626
Reputation: 1794
JFormatter declared as final, so not, it isn't possible.
There's only two ways to solve the problem and continue using codemodel.
Upvotes: 1