March 14, 2006

Another DWIM in IDEA: image size

In addition to being a fantastic Java IDE, IDEA is a pretty sharp XML/HTML editor. It understands DTDs and schemas and is able to apply its autocomplete and in-time validation to these documents just as it does with Java source. And the editor for some XML documents have refactoring smarts built-in as well -- Shift-F6 (Rename) on an Ant variable will rename it throughout the file. (I wouldn't be surprised if it did so in files called by the Ant build script either.)

So while editing some Javadoc I stuck in an image link. IDEA found the image for me: in the src attribute I typed 'd' then Ctrl-space, '/', then Ctrl-space again and it found the only PNG file there. Easy enough.

But then I typed 'height' and thought, "I wonder if it'll autofill this...". So I followed with Ctrl-space and, sure enough, the image height popped in. Same with the width. Nice!

Obviously the technology behind this isn't astounding, it's just one of the nice little surprises where Jetbrains' attention to detail reveals itself.

(It just occurred to me that I've posted two items in a row about Jetbrains. Just a coincidence, honest.)

Next: JetBrains Team Server
Previous: Good ETech summaries from Phil Windley