Bug 225598 - Spell Checking is creating spelling errors and falsely flagging correctly spelled words
Summary: Spell Checking is creating spelling errors and falsely flagging correctly spe...
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sergey Prigogin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-03 12:36 EDT by Chris Grey CLA
Modified: 2009-01-12 09:13 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Grey CLA 2008-04-03 12:36:33 EDT
Build ID: I20080207-1530

Steps To Reproduce:
Scenario 1:
1.Type this in as a C comment: // ditto
2. Locate the cursor between the two "t"s
3. Ctrl-Space to summon suggestions

At this point, you should have:  // dittoto 

Scenario 2:
1.Type this in as a C comment: // divisible
2. Locate the cursor between the "d" and "i". At this point, you get a list of words that begin with "d". 
3. Press the Right-Arrow key to include the letter "i" in the suggestions. At this point, the suggestions should narrow the possible words down to only words that begin with "di". As you can see, the word "divisible" is in the list.  
4. Select it. At this point, you should have this as text: // divisiblevisible


In order for this to reproduce, you may need "Word Proposals" selected under C/C++>Editor>Content Assist>Advanced.

More information:
I'm working with this morning's CDT release (5.0.0.200804020801). 

As stated in the Steps To Reproduce, the spell checker is wrongfully flagging words and mangling the suggestions. 

I suspect there are likely multiple bugs here:
1. The word is flagged as misspelled but is correctly spelled AND is in the spell checker database
2. The trailing letters are not replaced when the suggested word is chosen. I could even accept that perhaps this was not the intended use of this feature since it is simply doing things exactly like it always would when giving code suggestions. However since this is the only way to get a list of spellings for the word, I mention it as part of this bug since there's no other obvious way to get the spelling corrected short of getting a spell checker outside of the CDT editor to check the word.

As a side-note, I think more work needs to be done to the CDT spell checker to make it more usable. The Eclipse helpfiles indicate to go to the menu and click Edit>Spell Check, to summon the manual Spell Checker but that option doesn't exist on the Edit menu of a CDT editor. And right-clicking the flagged/misspelled word doesn't intuitively prompt for suggestions either as most people are used to Office and OpenOffice behaving for misspelled words.
Comment 1 Sergey Prigogin CLA 2008-04-05 16:40:45 EDT
(In reply to comment #0)
There are two different pieces of functionality. Spell correction proposals are part of Quick Fix and are accessed by pressing Ctrl-1. Word completion proposals are accessed by pressing Alt-/, or Ctrl-Space, if word proposals are enabled as part of context assist.

Word completion attempted in the middle of a word may be confusing since it doesn't replace the rest of the word. This behavior is consistent with other types of auto completion. Java context assist has Completion inserts/Completion overwrites user preference. You may consider filing an feature request to add such preference to CDT. 

> The Eclipse helpfiles indicate to go to the menu and click
> Edit>Spell Check, to summon the manual Spell Checker but that option doesn't
> exist on the Edit menu of a CDT editor.

Please file a bug against Eclipse help. Spell correction proposals are activated by Edit>Quick Fix, not by Edit>Spell Check.

> And right-clicking the flagged/misspelled word doesn't intuitively prompt
> for suggestions either as most people are used to Office and OpenOffice
> behaving for misspelled words.

CDT behavior is consistent with JDT. Consistency within Eclipse tramps consistency with other applications. 

Comment 2 Sergey Prigogin CLA 2008-04-05 16:45:19 EDT
(In reply to comment #1)
Spelling correction: tramps -> trumps :-)
Comment 3 Chris Grey CLA 2008-04-07 08:03:04 EDT
I can certainly understad trumping the decision for the purposes of consistency through the product. But is there any way the "Quick Fix" Ctrl-1 option can get added to the right click menu (preferably as the top option) for CDT editors when right-clicking a word that is flagged as mispelled? 

Since right-clicking directly to "Quick Fix" is not an option, is there any way that the mouse-over/hover window can indicate not only that the word is mispelled (as it currently does), but that "Quick Fix" Ctrl-1 is the way to do something about it? Doing this alone would be better than nothing...IMO. 
Comment 4 Sergey Prigogin CLA 2008-05-08 09:29:18 EDT
In HEAD > 20080508 I've added a hover with spell correction proposals. Spell correction in CDT now behaves exactly the same as the one in JDT 3.4