Eclipse 3.3M7 broke my fingers

Eclipse 3.3M7 was released yesterday, and lo, it was good. But there’s just one small hitch: it completely broke the way I write code in Java.

Let me explain. Java is now such a verbose language that one has to rely on the completion features of an IDE to avoid developing repetitive strain injury. A long time ago I used to write all my Java and C code in Vim, but I gave this up when I finally found an IDE that wasn’t crap (Eclipse). Now I can’t imagine using a plain text editor for Java, especially since Generics came along and made it impossible to fit a simple variable assignment into an 80-character wide terminal.

So, suppose I want to enter a line of code that looks like this:

WibbleHome wibble = (WibbleHome) context.lookup("wibble");

In Eclipse version 3.3M6 and earlier I would start by entering this:

context.lookup("wibble");

Then with my cursor at the end of the line I would press Ctrl-1 on Windows or Cmd-1 on Mac OS, which would offer a quick-fix dialog like this:

quickfix1

Pressing enter would give me the assignment to the local variable. I could overtype the variable name, hit tab and overtype the variable type, and then do another quick Ctrl-1 to introduce the cast. It sounds fiddly, but it was much quicker than just typing everything out explicitly.

However in 3.3M7, the first Ctrl-1 now gives me the following dialog:

quickfix2

Ah yes, the Powers That Be have decided to bless Eclipse with a spelling checker. I can’t for the life of me fathom why I would want to spellcheck Java code, or in fact why I would want to have any natural language strings in my code. If I was using Eclipse as a text editor then I could see the point – but the built-in text editor in Eclipse is the only one in the world that still doesn’t have word wrapping, so that’s not going to happen.

I wouldn’t mind so much if the spellcheck was just another option that appeared on the Ctrl-1 popup, but it should certainly appear below the other options. The fact that it obliterates other options is unforgivable.

Fortunately there are three possible fixes for this issue:

  1. Turn off the spelling checker. Nice and simple, and this is what I’m going to do for now.
  2. Add the word “wibble” to Eclipse’s dictionary. After all it’s a perfectly good Blackadderesque word, commonly used by British programmers of a certain age as an alternative to “foo”. Incidentally, foo and bar derive from the US Army slang expression FUBAR, meaning “F***ed Up Beyond All Recognition/Repair”, so I would expect the normally prudish Americans to be with us on this one.
  3. Learn the keystroke “Ctrl-2, L”. Easier said than done, alas. The problem is that my fingers are a lot harder to reprogram than my brain. Back when I was a heavy vi user, my fingers knew how to do things that my brain didn’t have a clue about. If somebody asked me “how do I replace initial tabs with spaces in vi” then I couldn’t answer unless I actually got in front of a keyboard and watched what my fingers did. Eventually I could do it with an imaginary keyboard, but my fingers still had to move. I called this technique “air vi”.