質問

When I use eclipse and see my name in the javadocs as the author, I also find the spellchecker marking my name as it does not understand that it is a proper name. Thus, I get the option of:

Add {word} to dictionary

but when I click on it, It says the user dictionary is missing and asks if I would like to create a new one. When I say yes, it just shows the spell checking preferences with a blank user dictionary field where I have the option to only add an existing user dictionary and no option to create a new one.

How do I create the user dictionary so that I can configure it for use in eclipse?

役に立ちましたか?

解決 2

Yes, you can.

Create a text (.txt) file in a directory on your computer. Your Eclipse workspace may be appropriate. Add a new word on each line in the .txt file. You don't have to remember every word, that's what the help option is for, when you type a misspelling/a word eclipse doesn't know.

Go to WindowPreferencesGeneralEditorsText EditorsSpelling and find the User defined dictionary section. To the right of that is a button called "Browse" click it, navigate to your text file, and choose it. You'll need to restart Eclipse in order for the changes to take effect.

You can also just type in the text box next to "User defined dictionary" in the Spelling Menu the path to where you want the file to be. It doesn't have to exist, but you must be familiar with paths if you want to do this.

他のヒント

When in C/C++, you must change the "Select spelling engine to use" option at the top of that options page to be "C/C++ spelling engine".

enter image description here

The user dictionary is just a plain text file with one word per line.

You do not have to create this file, just put the path to where you want to store the file in the 'User defined dictionary' configuration that Eclipse shows you and it will create the file.

Another thing to watch out for, at least in Eclipse Kepler, is that the dictionary cannot be located in C:\ProgramFiles\eclipse. I could not add words to the dictionary when I put the file there, maybe because it doesn't have permission to that directory.

I'm late to the party, but for Eclipse I kept having a spelling check error pop up for the word "accessor" that I was using in a comment for a school project. I found that using @DonyorM / @Gabriel Staples comment helped me solve this problem.

I just went to Window → Preferences → General → Editors → Text Editors → Spelling and typed in the word I needed to add next to the "User defined dictionary" box. I then clicked browse, created a folder in my workspace labeled as "ECLIPSE DICTIONARY", then created a text file labeled as "DICTIONARY" in that folder. After creating and directing eclipse to use that pathway, it added the word automatically to the text file.

(Also, for clarification you don't have to label the folder and text file to what I labeled it as. I'm sure you could name it whatever you wanted.)

Now I don't have to look at that pesky red line underneath that particular word.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top