Bug 156852 - [Wizards] New spelling error marking: add to dictionary and fix with dictionary
Summary: [Wizards] New spelling error marking: add to dictionary and fix with dictionary
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Michael Valenta CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 210370 (view as bug list)
Depends on: 194574
Blocks:
  Show dependency tree
 
Reported: 2006-09-11 07:02 EDT by Dani Megert CLA
Modified: 2007-11-27 11:43 EST (History)
5 users (show)

See Also:


Attachments
Fix (4.41 KB, patch)
2007-06-26 09:19 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2006-09-11 07:02:09 EDT
N20060911-0010.

The commit dialog now marks spelling errors [great]. Now I should also be able to add a word to the dictionary and/or fix the error using words from the dictionary.
Comment 1 Michael Valenta CLA 2006-09-11 08:32:47 EDT
I knew this was coming;-) I agree that this would be helpful but we don't have the manpower to provide this feature. Patches are greatfully accepted.
Comment 2 Eugene Kuleshov CLA 2006-09-11 14:12:16 EDT
It would be easy to implement, but I'll hold on that till Daniel figure out how he want to deal with bug 88293 ;-)
Comment 3 Dani Megert CLA 2006-09-12 03:43:28 EDT
Mmh, I don't think this bug depends on bug 88923 and I'm not corrupt ;-)
Comment 4 Eugene Kuleshov CLA 2006-09-12 13:33:48 EDT
It depends. ;-)
Comment 5 Dani Megert CLA 2007-06-25 11:45:07 EDT
I'll provide a patch for that one.
Comment 6 Dani Megert CLA 2007-06-26 09:19:00 EDT
Created attachment 72467 [details]
Fix

NOTE: This fix depends on HEAD of org.eclipse.ui.ide
Comment 7 Eugene Kuleshov CLA 2007-06-26 10:54:20 EDT
(In reply to comment #6)
> NOTE: This fix depends on HEAD of org.eclipse.ui.ide

Daniel, can you give some clue how this could be implemented without new support in head? Not all plugins can afford to pickup trunk version of ide.
Comment 8 Dani Megert CLA 2007-06-26 10:58:07 EDT
>Not all plugins can afford to pickup trunk version of ide.
Not sure what you mean here.

No, there is not other way than using HEAD of ui.ide as the quick assist binding needed to be extended to dialogs.
Comment 9 Dani Megert CLA 2007-06-26 11:04:34 EDT
You will not get compile errors if you apply the patch. It just won't work until you have the update binding from ui.ide's plugin.xml.
Comment 10 Eugene Kuleshov CLA 2007-06-26 11:32:46 EDT
(In reply to comment #8)
> >Not all plugins can afford to pickup trunk version of ide.
> Not sure what you mean here.

There is number of 3rd party plugins or projects outside Platform/IDE that would benefit from this feature and those projects are going to be used with Eclipse 3.3 release for at least another year. So, it would be handy if they could use some workaround to get this functionality in 3.3.

> No, there is not other way than using HEAD of ui.ide as the quick assist
> binding needed to be extended to dialogs.

Can 3rd party plugins somehow enable own bindings to make it work on Eclipse 3.3?
Comment 11 Dani Megert CLA 2007-06-26 11:42:08 EDT
You mean they go the painful way of downloading the SDK 3.4 and then only take CVS UI 3.4 but not IDE 3.4?
Comment 12 Eugene Kuleshov CLA 2007-06-26 11:49:20 EDT
(In reply to comment #11)
> You mean they go the painful way of downloading the SDK 3.4 and then only take
> CVS UI 3.4 but not IDE 3.4?

I mean that CVS UI plugin is not the only plugin that needs this feature and unlike CVS UI, other plugins won't have luxury to run on SDK 3.4 for another year. Henve, can they use some workaround to get this feature on 3.3?
Comment 13 Dani Megert CLA 2007-06-26 11:56:05 EDT
The only thing that's outside CVS UI is the change of the binding in ui.ide. We could put that into 3.3_maintenance if Platform UI also agrees (I own the quick assist/fix command in there but the final shot is with them).

Adding this to 3.3.0 is completely out of scope and not worth further discussion.
Comment 14 Eugene Kuleshov CLA 2007-06-26 12:29:03 EDT
(In reply to comment #13)
> The only thing that's outside CVS UI is the change of the binding in ui.ide. We
> could put that into 3.3_maintenance if Platform UI also agrees (I own the quick
> assist/fix command in there but the final shot is with them).

So, would it work if 3rd party plugin would add this binding in its own plugin.xml or there is something else need to be done other then using adding init code like in your patch?

  <key commandId="org.eclipse.jdt.ui.edit.text.java.correction.assist.proposals"
      sequence="M1+1"
      schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
      contextId="org.eclipse.ui.contexts.dialogAndWindow" />

> Adding this to 3.3.0 is completely out of scope and not worth further
> discussion.

I never suggested that.

Comment 15 Dani Megert CLA 2007-06-26 12:49:44 EDT
>I never suggested that.
k. Saw 3.3 in your comment and wasn't sure. Sorry if I misunderstood.

Yes, that works as well. You can even use the more concrete dialog context:
    contextId="org.eclipse.ui.contexts.dialog"
Comment 16 Dani Megert CLA 2007-06-26 12:52:58 EDT
This would be the corrrect and better way as this also works for those based off 3.3.0.
Comment 17 Eugene Kuleshov CLA 2007-06-26 13:47:10 EDT
Great! Thanks Daniel
Comment 18 Dani Megert CLA 2007-06-27 09:38:37 EDT
BTW: The viewer is not updated until the next text change. This is not a bug with the patch itself but a missing feature in Platform Text: so far this only works in editors. I've now fixed that in HEAD (see bug 194574 for details).
Comment 19 Michael Valenta CLA 2007-06-28 09:41:11 EDT
Patch released to HEAD. Thanks Dani.
Comment 20 Eugene Kuleshov CLA 2007-06-28 09:50:46 EDT
By the way, shouldn't be quicfix action checking if operation can be done before calling it? I.e. something like this:

  Action quickFixAction = new Action() {
    public void run() {
      if(viewer.canDoOperation(ISourceViewer.QUICK_ASSIST)) {
        viewer.doOperation(ISourceViewer.QUICK_ASSIST);
      }
    }
  };

I am not completely sure how source viewer is configured, but there is probably some possibility that dictionary is not installed or spellchecking is disabled...
Comment 21 Dani Megert CLA 2007-06-28 10:21:28 EDT
The TSVC already does that check.
Comment 22 Tomasz Zarna CLA 2007-08-09 08:02:35 EDT
Verified in I20070808-1800. Add/ignore/fix with dictionary work smoothly.
Comment 23 Mik Kersten CLA 2007-11-27 11:43:53 EST
*** Bug 210370 has been marked as a duplicate of this bug. ***