Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Selection tracking versus cursor tracking
Selection tracking versus cursor tracking [message #334501] Thu, 12 February 2009 15:47 Go to next message
Eclipse UserFriend
Originally posted by: bim2009.basistech.com

I've got a case where I need a view to reflect the cursor position, not just
the selection, of an editor. Adding the NullSelectionListener interface has
the effect of getting me a notification when the selection goes from
something to nothing, but not of notifying me of further cursor movement.
Should I just implement my own notification structure for this?
Re: Selection tracking versus cursor tracking [message #334502 is a reply to message #334501] Thu, 12 February 2009 16:53 Go to previous messageGo to next message
Eclipse UserFriend
Benson,

You will probably have to register a MouseMoveListener on the underlying
SWT control.


Benson Margulies wrote:
> I've got a case where I need a view to reflect the cursor position, not just
> the selection, of an editor. Adding the NullSelectionListener interface has
> the effect of getting me a notification when the selection goes from
> something to nothing, but not of notifying me of further cursor movement.
> Should I just implement my own notification structure for this?
>
Re: Selection tracking versus cursor tracking [message #334506 is a reply to message #334502] Fri, 13 February 2009 03:51 Go to previous message
Eclipse UserFriend
Karl Koster wrote:
> Benson,
>
> You will probably have to register a MouseMoveListener on the
> underlying SWT control.
Don't do this. You should not update immediately on caret move. You can
use a post selection listener which will give you the caret location.

Dani
>
>
> Benson Margulies wrote:
>> I've got a case where I need a view to reflect the cursor position,
>> not just
>> the selection, of an editor. Adding the NullSelectionListener
>> interface has
>> the effect of getting me a notification when the selection goes from
>> something to nothing, but not of notifying me of further cursor
>> movement.
>> Should I just implement my own notification structure for this?
>>
Previous Topic:Update process hanging on download
Next Topic:Open XML file and read.
Goto Forum:
  


Current Time: Thu May 01 22:32:28 EDT 2025

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

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

Back to the top