开发者

Java files code formatting Standards

What are the available tools or eclipse plugins to format my .java source / .XML / .XSL / .properties. I would like to know the diffe开发者_C百科rence between each of these tools, it helps me to identify the best tool/plugin.

Moreover , How to find the best standards for formatting java code ?


Eclipse comes with a powerful builtin code formatter that can be customized in great detail. Look in the Preferences menu.


Most editors have a standard auto formatting capability usually accessible through CTRL+SHIFT+F. In addition a large number of them have styles which you can tailor to your own taste in the applicable preferences section.


You can always use checkstyle.

Checkstyle is configurable, and it will verify that your Java source code fits with a number of configurable style choices.

As far as .properties files, there's really only one style. If it is not in that style, it's not a parsable .properties file.

For XML, the standard allows for several styles. By styles, I mean indenting, etc. XML is very structured (as determined by the corresponding XSL file) so there's little that can change except the amount of ignorable whitespace between tags and elements. As far as I know, there's not a XML "style checker", because there's so few options to select form with XML.

The same goes for XSL, which is a XML file (purposed for templeting XML files).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜