Is there a program (Java program) to format code according to Java code format conventions?
Does a开发者_开发知识库n Ant task exist?
There is an Ant external task for Jalopy.
- http://ant.apache.org/external.html
- http://jalopy.sourceforge.net/
- http://ant.apache.org/faq.html#adding-external-tasks
Hope this helps
Eclipse will automatically do this for you if you tell it to. or at least it will do an awful lot of it. I doubt it would rename variables to meet the coding standard though.
Click on the properties for you project and look at the options under "Java Code Style"
You will have to open each file individually and save it though.
You can also install CheckStyle to enforce coding standards.
精彩评论