Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344932 - [spell checking] Unable to add a text phrase to the spelling file
Summary: [spell checking] Unable to add a text phrase to the spelling file
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 05:03 EDT by Marcus Walla CLA
Modified: 2017-04-08 15:16 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Walla CLA 2011-05-06 05:03:15 EDT
Hallo Eclipse developers!

I wanted to add a text phrase to the spelling file but Eclipse always opens a dialog box and wants to create a new file whereas the file already exits and is accessible. The new spelling file was added to Eclipse under the following path: Eclipse -> Preferences... -> General -> Editors -> Text Editor -> Spelling -> Dictionaries -> User defined dictionary. I'm currently running Eclipse 3.6.2 under MacOS 10.6.7/Darwin 10.7.3. Here is a print out of the file access from the command line: -rw-r--r--  1 walla  mcs  2 Mar 14 14:44 spelling.txt. The file has only one line feed.

Best Regards,
Marcus Walla


-- Configuration Details --
Product: Eclipse 1.3.2.20110218-0812 (org.eclipse.epp.package.java.product)
Installed Features:
 org.eclipse.platform 3.6.2.r362_v20110210-9gF78Gs1FrIGnHDHWkEcopoN8AmxeZflGDGKQi
Comment 1 Dani Megert CLA 2011-05-06 09:18:42 EDT
Sorry, I don't quite understand the bug. Can you provide more details?
Comment 2 Marcus Walla CLA 2011-05-06 10:47:30 EDT
Ok, here is a short description:

1. Download Eclipse 3.6.2 for Mac OS and installed it
2. Create an empty dictionary file under <dir>/spelling.txt on a terminal
3. Start Eclipse
4. Install CDT (C/C++ plugin, version 7.0.2) from Eclipse update side and restart it
5. Open the preference panel for spelling (menu path): Eclipse -> Preferences... -> General -> Editors -> Text Editor -> Spelling
6. Toggle the item "Enable spell checking" to selected
7. Under the group "Directories" browse to the dictionary file: <dir>/spelling.txt
8. Tell Eclipse to accept the changes with the "OK" button
9. Create a new C++ file and entered a phrase which is unknown to the dictionary. Under the up coming popup menu I wanted to add the phrase to the dictionary
10. After this Eclipse always opens a dialog box because the dictionary file seems not to be configured. This is a failure because I already have configured it under step 7

Hope this helps. BTW, with Java files I can add new text elements but with C++ files not.
Comment 3 Dani Megert CLA 2011-05-06 10:59:52 EDT
Do you have Java/JDT installed? If so, could you test there too?
Comment 4 Marcus Walla CLA 2011-05-06 11:09:30 EDT
With Java/JDT I can add text elements to the dictionary file but don't under C++/CDT.
Comment 5 Dani Megert CLA 2011-05-06 11:13:28 EDT
(In reply to comment #4)
> With Java/JDT I can add text elements to the dictionary file but don't under
> C++/CDT.

Looks like this belongs to CDT then.
Comment 6 Marc-André Laperle CLA 2011-05-07 11:06:27 EDT
Do you have a spelling engine selected in 
Eclipse ->
Preferences... -> General -> Editors -> Text Editor -> Spelling ?

This looks similar to bug 310237
Comment 7 Marcus Walla CLA 2011-05-09 03:42:27 EDT
Hi Marc-Andre,

sorry for the long delay! Yes, I have selected the spelling engine with that preference path.

Cheers, Marcus
Comment 8 Marc-André Laperle CLA 2011-05-09 05:48:52 EDT
(In reply to comment #7)
> sorry for the long delay! Yes, I have selected the spelling engine with that
> preference path.

And do you have a dictionary file set for the C/C++ Spelling engine? I think what's happening here is similar to bug 310237 comment 3
Comment 9 Marcus Walla CLA 2011-05-09 11:21:57 EDT
No. From my point of view there seem to be only one preference panel in which I can manipulate a spelling file. This preference page can be found under the already mentioned path: Eclipse -> Preferences... -> General -> Editor -> Text Editor -> Spelling. So, there seem to be another spelling file for C/C++ files? Can you give me a hint where to find these settings? Currently I have no clue how to create a spelling file for C++ files! (... I filled in the filter in the preference dialog pages in the top left corner with "spelling" which only provides the the upper path)
Comment 10 Marc-André Laperle CLA 2011-05-13 21:47:25 EDT
(In reply to comment #9)
> No. From my point of view there seem to be only one preference panel in which I
> can manipulate a spelling file. This preference page can be found under the
> already mentioned path: Eclipse -> Preferences... -> General -> Editor -> Text
> Editor -> Spelling. So, there seem to be another spelling file for C/C++ files?
> Can you give me a hint where to find these settings? Currently I have no clue
> how to create a spelling file for C++ files! (... I filled in the filter in the
> preference dialog pages in the top left corner with "spelling" which only
> provides the the upper path)

In that same page, you should have a combo box 'Select spelling engine to use:". If it's set to 'Default spelling engine', try selecting 'C/C++ spelling engine' and then setting the dictionary file.
Comment 11 Nathan Ridge CLA 2016-12-29 01:44:26 EST
I can't reproduce this issue with CDT 9.2.

(In reply to Marc-André Laperle from comment #10)
> (In reply to comment #9)
> > No. From my point of view there seem to be only one preference panel in which I
> > can manipulate a spelling file. This preference page can be found under the
> > already mentioned path: Eclipse -> Preferences... -> General -> Editor -> Text
> > Editor -> Spelling. So, there seem to be another spelling file for C/C++ files?
> > Can you give me a hint where to find these settings? Currently I have no clue
> > how to create a spelling file for C++ files! (... I filled in the filter in the
> > preference dialog pages in the top left corner with "spelling" which only
> > provides the the upper path)
> 
> In that same page, you should have a combo box 'Select spelling engine to
> use:". If it's set to 'Default spelling engine', try selecting 'C/C++
> spelling engine' and then setting the dictionary file.

I do not see that combo box, or any other reference to an "engine", on that preference page.
Comment 12 Marc-André Laperle CLA 2017-01-03 11:52:26 EST
(In reply to Nathan Ridge from comment #11)
> I do not see that combo box, or any other reference to an "engine", on that
> preference page.

Do you have both JDT and CDT installed (or in your target) ? I think maybe that combo box doesn't appear unless there are multiple engines. I don't quite remember how this works though.
Comment 13 Nathan Ridge CLA 2017-04-08 15:16:53 EDT
(In reply to Marc-André Laperle from comment #12)
> (In reply to Nathan Ridge from comment #11)
> > I do not see that combo box, or any other reference to an "engine", on that
> > preference page.
> 
> Do you have both JDT and CDT installed (or in your target) ? I think maybe
> that combo box doesn't appear unless there are multiple engines. I don't
> quite remember how this works though.

You're right. After installing JDT, I now see the "Select spelling engine to use" combo box on the Spelling preference page.

I can confirm that the different spelling engines can use different user-defined dictionary files, and that in the C/C++ editor, "Add to dictionary" will add things to the user-defined dictionary for the C/C++ spelling engine.

This seems to be working as intended, so I'm going to close this bug.