Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357429

Summary: [ui] Spellcheck marks misspelled words in the XML Editor, but it is impossible to bring up the quick fix menu with spelling corrections
Product: [WebTools] WTP Source Editing Reporter: Jim Hurne <hurne_jim>
Component: wst.xmlAssignee: wst.xml <wst.xml-inbox>
Status: RESOLVED INVALID QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: nsand.dev, spencer
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://stackoverflow.com/questions/4174549/how-to-show-a-list-of-spelling-suggestions-in-the-default-eclipse-xml-editor
Whiteboard:

Description Jim Hurne CLA 2011-09-12 21:55:23 EDT
Build Identifier: 20110615-0604

When editing an XML document in the XML editor with general Eclipse spell checking enabled, misspelled words are correctly marked (underlined). However, as far as I can tell, there is no way to get a list of suggested spelling corrections.

I've tried bringing up the Quick Fix menu both by right-clicking on the misspelled word, and by using the keyboard shortcut (Ctrl-1), but with no luck.

I've had this problem for a long time now, and have observed it in many builds of Eclipse (for example, I've seen this problem in both Helios and Indigo).  Talking with other Eclipse users, the problem does not appear to be platform specific (I personally use Ubuntu Linux, but other users have mentioned they see the same problem on other platforms like Windows).

Reproducible: Always

Steps to Reproduce:
1. Ensure spell checking is enabled.
2. Create a new XML document and open it in the default XML editor.
3. Add a misspelled word somewhere in the XML document.
4. Notice how the word is correctly marked as misspelled.
5. Attempt to bring up the quick fix menu using the Ctrl-1 keyboard shortcut.
6. Attempt to bring up the quick fix menu by right-clicking on the word and selecting the Quick Fix menu item.
Comment 1 Nitin Dahyabhai CLA 2011-09-12 22:09:04 EDT
It works when I try it.  This may not sound relevant, but do you have the Java tools installed?
Comment 2 Jim Hurne CLA 2011-09-13 04:53:40 EDT
(In reply to comment #1)
> It works when I try it.  This may not sound relevant, but do you have the Java
> tools installed?

Yes, the Java tools are installed.
Comment 3 Nitin Dahyabhai CLA 2011-09-13 17:35:23 EDT
Well then I'm a little confused.  Is there a specific misspelled word I should try with the default U.S. English dictionary to verify whether I also don't get corrections?  This is with the cursor not after the last character in the word, right?
Comment 4 Jim Hurne CLA 2011-09-13 20:06:06 EDT
(In reply to comment #3)
> Well then I'm a little confused.  Is there a specific misspelled word I should
> try with the default U.S. English dictionary to verify whether I also don't get
> corrections?  This is with the cursor not after the last character in the word,
> right?

Correct. The cursor is in the middle of the word. It doesn't really matter what word is misspelled.  Try: "mispelt", "incorrict", or anything else.

I have never been able to get this to work. Ctrl-1 is the correct keystroke, right?

I'll double-check on some other machines to make sure I'm not crazy.

Spell check works fine everywhere else in Eclipse (in virtually every other editor that supports spell check). It's only the XML editor I'm having trouble with.

Could it be an interaction with another plugin? For example, I have the m2eclipse plugin installed with the optional POM editor.  I'll try a "bare" Eclipse install and report back my findings.
Comment 5 Nitin Dahyabhai CLA 2011-11-06 13:49:09 EST
ping
Comment 6 Jim Hurne CLA 2011-11-06 14:01:47 EST
(In reply to comment #5)
> ping

Sorry, I've been very busy recently. I'll hopefully have a chance to try to reproduce the bug in the next week.
Comment 7 Jim Hurne CLA 2011-12-11 06:50:59 EST
I cannot seem to reproduce the issue anymore.  If I do, I'll ether reopen this bug or open a new one if I have a better understanding of what's causing it. Thanks for your patience.
Comment 8 Spencer Van Hoose CLA 2015-04-29 12:45:30 EDT
I just encountered this in the "pom.xml" section of the m2e pom editor. If I edit a standard XML file quick fix works fine but Ctrl+1 does nothing in the POM XML editor. Could that be the problem you were seeing?