WARNING: This blog entry was imported from my old blog on blogs.sun.com (which used different blogging software), so formatting and links may not be correct.
One of the things I did this week was to rewrite the code which extracts documentation for all the core Ruby APIs (which are defined in the C Ruby implementation). This fixes some bugs where a method here and there were missing its documentation.
In doing so, I started looking at the actual IDE presentation of the documentation as well, and thought I could make it a lot more appealing. Without further ado, here's how the documentation looks now:
The most interesting part here is that the IDE now figures out whether portions of the documentation corresponds to Ruby code, and then presents it with syntax highlighting right there in the documentation popup. (I've also improved the way the method signatures are displayed so it should use less space and be more readable now, although that's harder to spot than if you compare before-and-after shots.)
Heres another example. This shows a migration in a Rails application, where you're getting code completion on the
One interesting aspect of this highlighting is that it's easier to spot mistakes in your comments. As I was testing this feature, I pulled up the documentation on the Rails
send_file method - and the following code fragment looked wrong:
Sure enough, it looks like it's missing a single-quote right after
404.html. This is the kind of thing which will be a lot easier to spot and fix with the new enhanced highlighting!
P.S. You don't have to use code completion to get the documentation popup - just hit Ctrl-Shift-Space with the caret on the symbol you want to look up - or Command-Shift-Space on the Mac.
(P.S.2: If you're trying to download this, see my other blog entry on the current temporary download location.)