|
Home
Articles/Links
Mugs, T-shirts
Comments/Raves
New in 1.5.3
A Game
An Online Test
Questions
Copyright/License
Download Free
If you need a non-LGPL version
You Can Buy!
Online help...
Quick Start
Tutorial Part 1
Tutorial Part 2
Tutorial Part 3
Tutorial Part 4
Tutorial Part 5
Tutorial Part 6
Examples
Support
FAQ
Documentation
Useful apps...
Java Beautifier
Code Colorizer
GUI Grep
Swing Grep
Other stuff...
Phreida
xmlser
 |
JavaBeautifier 1.0: JBuilder usage
A Screenshot
If you want to see a screen shot
of the current JavaBeautifier, please be aware that
the image size is over 100K.
Installing the JavaBeautifier in JBuilder 3.5
Simply place the binary, jbeaut.jar, in your lib/ext directory.
For example, on your NT machine it might be here:
C:\JBuilder35\lib\ext\jbeaut.jar.
Installing the JavaBeautifier in JBuilder 3.0
After downloading jbeaut.jar, place it
in the path of JBuilder at startup. On a Windows NT machine
you can do this by editing jbuilder.bat (which might be in D:\JBuilder30\bin\jbuilder.bat), and adding jbeaut.jar to
the tempcp path so that it looks like this:
set tempcp=\libs\jbeaut.jar
After this, you will find
that the JavaBeautifier is availble under the "Wizards" menu item.
What does it do? How do I use it?
The JavaBeautifier transforms the
code that you see in the display window. It takes
code that that looks like this:
if(a)
if(b)
c;
else(d)
e;
if(a) {
while(b) {
c; /*
Here is a table:
+------+------+
| col1 | col2 |
+------+------+
| vol1 | vol2 |
+------+------+
*/
}
}
|
and transforms it to look like this:
if(a)
if(b)
c;
else(d)
e;
if(a) {
while(b) {
c; /*
Here is a table:
+------+------+
| col1 | col2 |
+------+------+
| vol1 | vol2 |
+------+------+
*/
}
}
|
The text is indented "Tab Size" spaces (the number is
obtained from the input text area on the dialog) after each "{" and
just as many fewer spaces after each "}".
Note that while the multi-line comment in the above pseudo
code is indented, it's overall structure is returned. The +
is still aligned under the second "e" in "Here".
Although this is not apparent in the illustration, note that
all tabs are removed from the source file by the beautification
procedure and replaced by spaces.
By default, the JavaBeautifier does not
add any newlines to your code. If this is not the behavior
you desire, you
can ask the JavaBeautifier to insert carriage
returns after curly braces.
If the "End of Line" option is checked in the dialog,
then code of the following form:
would be transformed into the following:
If the "Next line" option is checked in the dialg,
then code of the following form:
would be transformed into the following:
|