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.

  1. process generated code tool/library.
  2. 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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -