Spell Checking in Eclipse PDT

This post is more than 18 months old. Since technology changes too rapidly, this content may be out of date (but that's not always the case). Please remember to verify any technical or programming information with the current release.

Although I’d like to pretend that my side jobs always are pure programming, but alas, not the case. There are times when the users send word docs to me and I have to convert them to html. Now, even these word docs might have spelling mistakes - but that’s just not ‘acceptable’ to them - I should correct those issues too! Whats up with that? But anyway, I now have a good plugin to do spellchecking in eclipse - that won’t break on code (well not sorta…). This supports spell checking as you type, language specific options, and more. At any rate, let’s check out eclipse’s built in spelling feature, and then see why this plugin I found is better:

Eclipse supports spell checking natively. In Eclipse 3.2, go to Windows > Preferences > General > Editors > Text editors > Spelling. Put a check mark in the Enable spelling and locate your dictionary file. Select any other options and you’re good to go. Finding a suitable dictionary file in Windows The best dictionary program/service I’ve ever used is aSpell. There is a win32 port of this tool on this webpage. Download and install the win32 binary, then your desired spell checking language. Both of the processes have a built in setup - so extremely easy! Now, for my configuration, I wanted to put an english dictionary in my eclipse directory. I dumped it from aspell into a plain text doc that was parse-able by eclipse by doing this:

aspell dump master en > c:\eclipse\en.dictionary

Once that was complete, I chose that file in my eclipse spelling configuration, and I was set. Now, this is pretty decent, but it becomes an issue with the whole spell checking all of the time. I wanted a spell checker that was smarter about the language I was using, provided suggestions (I’m a lazy MS Word user ;)), and could spell check on command, or sit there quietly until I wanted it to do the checking. Bdaum’s Eclipse Spell Checker Plugin was the answer for me Located here (Important: see installation notes here… and check their eclipse homepage), I found the best plugin for spellchecking I’ve used so far. This plugin allows me to do all of the things I wanted - its great. Let’s cover its features and how to use it. First off, it has to be installed like the installation notes say. I tried installing it other ways and ran into weird bugs. I’m not a java programmer or an eclipse master, so I’ll just chalk that one up to ‘he said so’. After I got it installed, Window > Preferences has a new option called Spelling (with a few sub options). It turns out that this plugin has its own little dictionary with it - so you can use it. I personally re-pointed mine back to my generated aSpell dictionary. The rest of the options I left as it was. Interestingly enough, some words were double underlined. Why? Heh - don’t forget to disable the existing spell checker. Now, it looks great. If you have check while typing option selected (one of the radio buttons), you’ll start getting underlined words. Words with little handles mean that you can right click on the word and see suggestions. Click a suggestion and it replaces it. You can also choose to ignore and add items to the custom dictionary. You can also turn off the check while typing option. Spell checking can be launched by going to Edit > Check Spelling. This will bring up a view in eclipse with errors, suggestions, and the standard spell checker options. Over all, I think this is the best spell checking extension I checked. Any of the other ones were just simply useless. Oh, and if you’re looking for a better dictionary than aSpell (better being subjective…), check out the wordlists project at sourceforge.

Go to All Posts