java - Custom formatter for Sun Codemodel -
i'm using java sun codemodel generate java classes on fly, , works pretty me.
now have additional challenge: how control how code formatted? there way @ all? in particular, i'd have curly brackets in new line , extend line length let's 130 chars.
e.g., have formatter use in eclipse. there's no way can tell codemodel use somehow, right?
there's jformatter class kind of looks useful something, doesn't can more sophisticated stuff that.
jformatter declared final, not, isn't possible.
there's 2 ways solve problem , continue using codemodel.
- process generated code tool/library.
- redefine library classes. find concrete classes unwanted formatting, create classes same package/name in project , write own implementation. there classes must appear in classpath earlier codemodel jar.
Comments
Post a Comment