Skip to main content


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] Fri, 11 February 2011 00:08 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
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 15:06 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
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: Fri Apr 26 14:29:32 GMT 2024

Powered by FUDForum. Page generated in 0.04037 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top