May 27, 2008

Making JavaDoc a bit more usable

First of all, I know people realized JavaDoc is a pain in the ass to use. I am also well aware of all those "let's make better JavaDoc" projects out there. Just for reference, there is

  1. Javadoc online, which is a simple JavaDoc search engine
  2. Docjar, with its tiny, unintuitive flash based JavaDoc browser, which takes ages to load
  3. Windows Help format JavaDoc
  4. Doctree -- directory of (all) JavaDoc sites
  5. Globaldocs, a JavaDoc browser
I am also well aware that each modern IDE can display JavaDoc, if you configure the proper URL first.

Call me old-fogyish, but I tried most of them and always ultimately returned to the (good?) ol' JavaDoc.

Fortunately, I found a way to cure JavaDoc's biggest wound -- it's inability to let me search for a class or a method. The cure is called Greasemonkey and JavaDoc Search Frame or JavaDoc Incremental Search script. How does it work? Install Greasemonkey and install the script. Point your browser on some JavaDoc site and enjoy the search.

Fortunately, it will work on (almost) all JavaDocs in the wild and requires no support from the JavaDoc creator. When the class html frame is loaded, Greasemonkey runs the script and the script automagically adds the search box.

JavaDoc Incremental Search

This is the older of the two scripts. It will display a search box above the class list and will filter out the classes as you type.

JavaDoc Search Frame

Based on the JavaDoc Incremental Search. This script completely removes the packages frame and spans the class frame vertically. It can search package names too and groups the results into packages, classes, interfaces etc.

Now, if only I could also search the methods..