Platinum Partner
eclipse,opinion,tools & methods,ides

Eclipse Spell Checker

One of the nice things of modern IDE’s are: they offer many extras for free. Many times it is related to programming and coding. But I love as well the ones which makes things easier and better which is not directly related to the executed code. One thing Eclipse offers is an on-the-fly spell-checking, similar to Microsoft Word:

Spellchecked Sources

Spellchecked Sources

Hovering over the text offers me to correct the flagged error:

Initialization vs. Initialisation

Initialization vs. Initialisation

But wait: is that example not spelled correctly?

And indeed, Eclipse offers to customize the spell checking. The option page is in the Windows > Preferences > General > Editors > Text Editors > Spelling page:

Spelling Preferences

Spelling Preferences

‘Initialization’ vs. ‘Initialisation’: that’s an ‘English US’ vs. English UK’ thing, and is easily changed. And I prefer the US English:

Changing Dictionary

Changing Dictionary

With this, everything is ok now:

not flagged any more

not flagged any more

:idea: After changing the platform dictionary, it usually takes a few minutes until the sources are checked again.

But what if Eclipse does not know a word? Then it offers to add it to a dictionary:

Adding to the dictionary

Adding to the dictionary

If I do not have a user dictionary yet, it will prompt a dialog:

Missing User Dictionary

Missing User Dictionary

If pressing ‘Yes’, it will prompt the settings page from above where I can specify my user dictionary file:

User defined dictionary

User defined dictionary

The user dictionary is a normal text file with one word on each line. That makes it easy to edit and to have it in a version control system.

:idea: I have one common dictionary file for all my workspaces. But of course it is possible to have different dictionaries per workspace, as the settings are per workspace too.

Summary

I feel having reasonable spelled comments in the sources is just something an engineer should care about. And the Eclipse spelling engine does not have to be as good as the one in MS Word (which is pretty good in my view). But for making sources better something like correctly spelled comments is a plus. But only if the code works like a charm :mrgreen:

Happy Spelling :-)

 

Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}