A Short Review of JIndent—the Java Beautifier
- By Richard Wiener
Having worked on multiperson Java software development projects, it has become evident how important it is to establish a uniform coding style and format across a project. It is often challenging enough to read and understand another team member's code. This task is made easier if the code being studied conforms in style to a common standard. Many organizations require a standard coding style.
JIndent (http://www.jindent.de), written by Tobias Andree and Andreas Dangberg of Software & Solutions in Paderborn, Germany, is a tool specifically designed to both establish a Java coding standard and to enforce this standard throughout a project.
I have used Version 3.23 Basic and Gold. The desired formatting style is established through a property file. This file provides the user many degrees of freedom in establishing a desired coding standard. Both horizontal as well as vertical spacing may be controlled through parameter settings in a property file. Options for formatting comments are also provided. Standard headers and footers may be inserted into each source file that is converted. The user also has the option of having no such insertions if desired.
The list of possible formatting options is too long to enumerate. I have found that the numerous parameter settings in a property file provide the user with excellent fine-grained control over formatting appearance. The Gold version of the product allows the user to see more quickly the effect of changing a parameter in a property file through a GUI. Aside from this small advantage, both versions of the product provide the same functionality in establishing a common Java coding style standard. One can of course customize several property files, each establishing its own coding style standard.
JIndent is written in Java. The installation of the program is simple and well-documented. Once a jar file is installed with a CLASSPATH pointing to it, the program may be invoked from a Command Shell with a choice of various parameters. JIndent may be applied to an entire subdirectory of Java source files at once. Many examples of usage are provided in the well-written 41-page documentation that you can download from their Web site. The documentation comes with a detailed index that makes it easy to navigate and find information quickly.
I believe that JIndent is a finely polished software tool that should be of great value to Java programmers working alone or in a team environment. I highly recommend this product.