27

For spell checking purpose I would like to install an addictional "platform dictionary" in my Eclipse IDE.

You can see the list of platform dictionaries installed in Window > Preferences > General > Editors > Text Editors > Spelling, in the field "Platform dictionary". In my Helios Service Release 1 there are only english of UK or USA. I would to put the language of my country, so I can write comments in my language and have spell check. Eclipse help doesn't explain how.

bluish
  • 26,356
  • 27
  • 122
  • 180

4 Answers4

24

If you can't find your language word list you can generate one using aspell.

aspell --lang=pl dump master | aspell --lang=pl expand | tr ' ' '\n' > pl.dict

In Ubuntu aspell generates list in UTF-8 in other systems you can add encoding option.

--encoding=utf-8
Konrad Nowicki
  • 1,929
  • 1
  • 14
  • 11
  • 3
    it slows down eclipse too much. my cpu stays running at 100% and eclipse freezes with any open text-file – Miguel Jul 26 '12 at 19:59
  • 1
    Easy way to get a large word list. You have to install the Aspell language package first. – Lii Nov 15 '12 at 11:36
21

I am not sure you can add a "Platform dictionary", so that leaves you with a "user defined" one:

alt text

Eclipse supports a standard one-word-per-line format for the 'dictionary' file.
You can have several of those at Kevin's Word List on Sourceforge.net, including links to other sites.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Even if it seems a strange design choice in Eclipse, it works! Thanks! To find the wordlist for my language I found usefull searching the internet for " wordlist". – bluish Dec 07 '10 at 09:15
2

If you can't find a good worldlist and can't run aspell, you can also get wordlists from Debian. On Windows, I used the Swiss German wordlist. Klick all, pick a mirror, download the .deb file, use 7-zip or similar to open it, open the data.tar inside, and find the file you are looking for. In my case it was /usr/share/dict/swiss.

Alex Schröder
  • 272
  • 2
  • 12
1

Thank you @VonC, @Konrad Nowicki and @Alex Schröder for the earlier answers. I didn't find the other answers fully satisfying so I wanted to write my own answer. Your question:

How to install a platform dictionary in Eclipse?

For English:

Since you mentioned that US and UK English is included, no need to explain.

For non-English languages, like languages with strange characters like åäöü, example here is Swedish (tested and it works):

Download a text file of the words. My method for downloading a file of words: I googled swedish word list txt (just change swedish to whatever language you're looking for a dictionary and I hope you'll find a txt dictionary) and found this (this link worked 2018-09-25) GitHub repo with an Swedish dictionary: https://github.com/martinlindhe/wordlist_swedish. As long as your dictionary file is formatted correctly in UTF-8 and have EOL (End of lines) characters Unix (LF) it should be fine. However, if it isn't formatted as UTF-8 you'll have to convert the åäöü characters to reflect the UTF-8 standard, example program for this: Notepad++. If the dictionary has another EOL characters: Windows (CR LF) or Macintosh (CR), then just convert it to Unix (LF), example program for this: Notepad++. Then open a text editor, example program for this: Notepad++, to append the new dictionary to your custom dictionary where it is located, often times %userprofile%/eclipse/dictionary.txt or ~/eclipse/dictionary.txt depending on where you installed Eclipse. Restart Eclipse and it should work.

propatience
  • 115
  • 1
  • 3
  • 9