I’ve been playing around with something new: google gadgets. Well, I’ve mostly been playing around with javascript and HTML because the part about packaging it together to form a gadget is actually pretty simple.

It’s an interesting experience for someone like me who has used dynamic web pages for years without the first clue about how they were implemented. So far, the fruit of my labors is limited to a gadget that lets you search javadoc (I haven’t thought up a name for it yet):

Ok, the screenshot actually only shows the control that will eventually inhabit the gadget. It’s inspired by the completion mechanism used in google suggest. When you enter text into the text field a list of suggestions will pop up that lets you jump to an appropriate javadoc page.

The javadoc index used to produce the list of suggestions is currently a (large!) piece of javascript code generated from the javadoc HTML class index by a perl script. But I intend to implement a mechanism so that the script just fetches the class list directly from the javadoc page. That way you should be able to point the gadget to any javadoc site and it will provide site-specific completion.

This does make me wonder: does anyone actually use javadoc on the web anymore? I mostly use it within eclipse and maybe everybody’s moved om from the web-based interface?

I hope to work on this over Christmas and have a beta ready within a week or two.

Update: I’ve put the current (alpha) version of this online at I’ve only tested it in firefox 2 and you’ll notice that there are still a few kinks to sort out but I think it gives a reasonable impression of how it will eventually work.

Update #2: I’ve fixed some bugs so now you can actually click on the items and go to the appropriate javadoc page. At least for most items. Also, it should now work in safari as well. Also, it can now be added as a gadget:

Add to Google

Leave a Reply

Your email address will not be published. Required fields are marked *