One great feature of Eclipse is its built-in spell checking engine. So no more excuses are possible for typos in the source code ;-). Eclipse scans the source code in the background and offers to correct it:
But Eclipse does not know all words, so it is possible to add a user dictionary which is a simple file with words on each line (see “Eclipse Spell Checker” and “How to re-enable ‘Add to dictionary’ for the Eclipse Spell Checker“). So if a word is not part of the built-in dictionary, I can add it too:
In case there is no user dictionary set for the Eclipse workspace, I can add it with the dialog which would pop up:
In the preferences I can add the text file for my dictionary:
However, there is a long standing bug in Eclipse, and it is important select the C/C++ spelling engine! Keep in mind that the setting is for the workspace, so if using a new workspace, make sure to assign the user defined dictionary file for it.
With this, I can use a custom dictionary. And I feel that having correct spelling in comments makes a huge difference about the perceived quality of code. And with the Eclipse spell checker, the correction is only one click away :-).
Happy Checking 🙂
Links
- Eclipse Spell Checker
- How to re-enable ‘Add to dictionary’ for the Eclipse Spell Checker
- Eclipse bug report 310237: https://bugs.eclipse.org/bugs/show_bug.cgi?id=310237