« What do you call satire that isn't.. | Main | Using google for good not evil »

Eclipse: convert tabs to spaces

If you recently upgraded from Eclipse 3.0x to 3.1x (as I have) and enjoy using spaces instead of tabs (as I do) then you might have discovered (as I have) that the option appears to have vanished from editor settings in preferences.

It took me a while (about 5 annoying minutes) to find it..


Window->Preferences
Java->Code Style->Formatter

Hit "edit"

Under "General Settings" uncheck "use tab character"

Apply.

If you were using the default formatter, it will ask you to save it as a new one.

That was obvious, wasn't it?

Comments

Now tell me how to make Eclipse trim trailing spaces at the end of lines (or spaces on a blank line) and I'll be VERY happy!