FixStyleFixStyle is a automatic code style improver for Java.
It acts much like a formatter. However currently it does no formatting.
Keeping a consistent modifier order helps improve clarity.
The order used is:
ExecutionThe program has a command-line interface - use
There's also a GUI. Here's a snapshot of it in action:
RecursionProvide a directory and it will deal with it recursively, dealing with all the java source files it finds beneath it.
MiscThe program was constructed using JavaCC and JJTree. These are open source products.
However it does not contain them - and is itself in the public domain.
JalopyThe formatter Jalopy also does the sorting described here: there's a description here.
Jalopy does many other things as well - but unfortunately not all of them can be turned off - and I don't currently feel able to run my code through it.
AimsThe aims here are to:
Unicode philosophyCurrently unicode characters are converted to characters on loading - and back to unicode on saving. This won't change the function of a program - but may change which characters are unicoded.
Preserving existing unicoding is on the wishlist.
WishlistWhat else is on the wishlist?
Currently it looks like this:
Java Web StartIf you run using Java Web Start, the program will request access to your machine on the basis of my phony developer certificate.
It's signed because the program needs to read and write files in bulk from your hard drive to be much use.
The certificate is phony because I haven't paid up for an authenticated certificate yet.
DisclaimerWhile I've tested this software - and it seems to work acceptably - you use it at your own risk - and I recommend you back things up before using it on a whole project.
It's been tested on Java 1.4 code. I make no claim that it will function correctly on Java 1.5 code (e.g. code using generics) without recompilation.
DownloadRun using Java Web Start.
Download the executable Jar file.
Download the Java source code.