Monday, May 3, 2010

How do I – Eclipse: Create a user spell checking dictionary

You know that Eclipse has built in spell checker, but what if you want to add some very specific words to spellchecker (and you want them to be treated as valid words).

For example, I want “Javadoc” keyword, that appears in comment , to be a valid word for Eclipse (I know what “Javadoc” means and I don’t want it to be underlined with red):

image

Solution – create a user dictionary.

First of all, create a .txt file somewhere on file system, then go to “Window” –> “Preferences”. An then: “General” –> “Editors” –> “Text Editors” –> “Spelling” and specify the full path to the file just has been created in “User Defined Dictionary” field.

image

Press “OK” and you’re done. Now you can add words to your custom dictionary.

Move your mouse over the word with spelling warning and you’ll see the following:

image

Select “Add {your_word} to dictionary” and … that’s it!

Happy Eclipse’ing :)

3 comments :

  1. Thank you very much FLUID, useful post!

    ReplyDelete
  2. To add words from C/C++ comments into a dictionary, make sure the "Select spelling engine to use:" field has been set to C/C++ : this represents a separate configuration to "Default spelling engine"

    ReplyDelete