JavaStyle is a pretty printer for Java. It works either in an IDE, (e.g jEdit or JBuilder) or as an ant task. It reformats the code and inserts javadoc comments where they are missing.
This current version takes a look at the name of the method. If the method is a setter or getter, it takes an intelligent stab at filling in the javadoc comments, based on the name of the method, the class, and whether the method is static or not.
If the method is named run or it appears to be the main program or it is a JUnit test harness, the javadoc comments are also generated appropriately. The exact words in the default descriptions for all methods are located in the pretty.settings file.
This software is the ability to set the level of protection that the system inserts javadoc comments. For instance, if the user of this program only wants javadoc comments for public methods and public fields, the user sets the method.minimum level to be public in the pretty.settings file.
There is also sophisticated control over indentation, sorting of methods, fields, etc., comment placement, alignment and many other features of Java style.
For jEdit, Netbeans, JBuilder and the Stand-alone application, this configuration editor is accessed via a menu item. The configuration tool knows about what projects are being worked on in the IDE and it allows separate settings for each project, all based on the settings of the "default" pseudo-project (fully working only for jEdit in Version 2.8).
For people using JRefactory as a command
line tool an older version of the configuration tool is available, the command line is:
java org.acm.seguin.tools.install.PrettyPrinterConfigGUI To use the GUI, adjust the values and select save from the menu. When you save the file, it reformats the code in the right hand side.
Alternatively, you can edit the pretty.settings file directly. The location of the pretty.settings file depends on the way you are using the pretty printer. In general, it is in your home directory, perhaps in the .jedit, .jbuilder9, .netbeans or .Refactory directories
Last Modified: 30 October 2003