Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping Eclipse from spell-checking e-mail addresses

I am using Eclipse 3.7SR2 and I have an issue with the Java editor spell-checker marking e-mail addresses:

Screen shot of Eclipse spell-checking e-mail addresses

Perhaps I am a bit obsessive, but I really dislike seeing those red blots - if not for any other reason, then just because real spelling errors could be missed in the crowd.

Is there a way to fix this on a permanent basis without disabling spell-checking completely?

UPDATE:

Adding the "word" in question (e.g. @example.com) to the user dictionary manually and restarting Eclipse does not seem to solve this issue.

like image 527
thkala Avatar asked Mar 10 '12 00:03

thkala


People also ask

How do I turn off spell check in eclipse?

Go to: Window -> Preferences, choose General, Editors, Text Editors, Spelling and disable spell checking.

How do I turn off auto spellcheck?

Here's how. Click File > Options > Proofing, clear the Check spelling as you type box, and click OK. To turn spell check back on, repeat the process and select the Check spelling as you type box.

Does email have spell check?

Click the FILE tab and Options. Click Mail and Spelling and AutoCorrect. Down here, you have options for the Spelling Checker. For example, you can uncheck Check Spelling as you type, if you don't want to see the red squiggly lines under misspelled words.

How do you do spell check in eclipse?

Eclipse has a built-in Spell Checker. Go to Window > Preferences > General > Editors > Text Editors > Spelling to enable it.


2 Answers

It is possible to get Eclipse to ignore email addresses using a User Dictionary:

  1. Go to Window -> Preferences
  2. Expand the panels to see General > Editors > Text Editors > Spelling.
  3. In the User defined dictionary field, enter a full path for a text file you'd like to keep the dictionary in. Or use the Browse... button if you already have a text file somewhere.
  4. Edit the file you have just specified in a text editor, and enter the two parts of the email address on separate lines; eg, for the example in this question, you would need to add "john" and "example.com".
  5. Repeat for any new email domains or user names that the spell checker flags.

This solution is not obvious because the spell checker highlights the "@" symbol too. But if "@example.com" is added to the dictionary, it does not stop the spell checker from complaining. You have to manually add the domain excluding the "@".

like image 73
David Edwards Avatar answered Nov 02 '22 22:11

David Edwards


Um, i can't find one. On the other hand, an inelegant solution would involve putting a capitalisation in the email address.

So [email protected] will get the error, but [email protected] will not. Or [email protected], which reads better.

like image 24
bharal Avatar answered Nov 02 '22 23:11

bharal