How NetBeans Got My Bag Stolen
By Geertjan-Oracle on Sep 15, 2006
The best way of learning about this NetBeans API feature is to read the interview with Jens Trapp and to then download his open sourced HTML Tidy integration module for NetBeans IDE. In that module, he provides an extension to the Output window, where error messages generated by HTML Tidy are listed as hyperlinks which can be clicked, and then the cursor lands on the line where the problem is found. Perfect for a spell check integration module, one would think. And a nice way of learning about this aspect of the NetBeans APIs.
So, while traveling to the airport in Oslo this morning, while waiting to check in, while waiting to board the plane, and while flying to Prague, I was constantly working on this part of my spell checker. Here's the result so far, you can see in the upper right corner the Output window with links, while below that is just a plain old JEditorPane. The lower one is going to contain Strings with different colors for the different types of spelling errors. The upper one is really meant for navigating (would be nice if there were some programmatic way of positioning the Output window, or at least one document within it, up there, instead of in the very large Output window space at the bottom, because the wrongly spelled words are never going to need as much width as the Output window provides). This is what it all looks like:
Half way to Prague, somewhere over Germany, I guess, the hyperlinks suddenly appeared. That was because earlier I had only sent the StringBuilder, i.e., without the OutputListener, to the OutputWriter. Both are needed. However, the hyperlinks don't actually work yet. A lot of work to be done there still. So, anyway, by this time I had arrived in Prague and was still working on the problem while sitting near the conveyor belt waiting for my bag. But I kind of drifted off into my coding... and the next thing I knew the conveyor belt was deserted, everyone had left, and there were no more bags coming out. It is possible that my bag just got lost, but I suspect that someone just picked up my bag and took it with them, after noticing that the one person still hanging out there wasn't picking up the one bag that was still circling the conveyor belt...