Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Spelling correction in hover
Spelling correction in hover [message #653754] Thu, 10 February 2011 19:08 Go to next message
Mauro Condarelli is currently offline Mauro Condarelli
Messages: 397
Registered: September 2009
Senior Member
I managed to add spell-checking to my editor (using hunspell).
Now I have squiggly underline and I can fix using either quickassist
(ctrl-1) or via mouse interaction (I added a MouseListener to my editor).

I have not been able to integrate spelling correction to hover; it just
displays the "spelling error" message I coded in my SpellingProblem.

How can I customize the Hover widget for SpellingProblems?

Any pointers welcome.

TiA
Mauro
Re: Spelling correction in hover [message #653856 is a reply to message #653754] Fri, 11 February 2011 10:06 Go to previous message
Mauro Condarelli is currently offline Mauro Condarelli
Messages: 397
Registered: September 2009
Senior Member
Replying to myself ;)

I found a rather convoluted way to display a custom Control as hover.
I also found an even more convoluted way to setFocus() to my control.
I strongly doubt this is the "right way" to implement custom hover.

Two problems remain:

1) Something must be missing: If I move my mouse outside from the
misspelled word my Hover Control disappears.
On the same wave: I didn't find how to focus my custom Control moving
the mouse over it. The Control disappears.

2) I need to replace the problematic text with my selection; Is there
some support for that (there should be: QuickAssist does work!)?
Otherwise I can always change editor contents by hand, but it seems an
useless duplication of code.

3) (not really a problem, but...) In my setup, if my Custom Control is
shown and I press "f2" my custom control disappears and the "standard"
one (the one displaying the message) replaces it (with focus).

Can someone tell me where to look?

TiA
Mauro


On 02/11/2011 01:08 AM, Mauro Condarelli wrote:
> I managed to add spell-checking to my editor (using hunspell).
> Now I have squiggly underline and I can fix using either quickassist
> (ctrl-1) or via mouse interaction (I added a MouseListener to my editor).
>
> I have not been able to integrate spelling correction to hover; it just
> displays the "spelling error" message I coded in my SpellingProblem.
>
> How can I customize the Hover widget for SpellingProblems?
>
> Any pointers welcome.
>
> TiA
> Mauro
Previous Topic:Plugin does not seem to start when running exported product
Next Topic:My AbstractDecoratedTextEditor doesn't respond to forward delete
Goto Forum:
  


Current Time: Sat Apr 19 13:14:31 EDT 2014

Powered by FUDForum. Page generated in 0.01501 seconds