Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Selection tracking versus cursor tracking
Selection tracking versus cursor tracking [message #334501] Thu, 12 February 2009 20: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 21:53 Go to previous messageGo to next message
KarlFriend
Messages: 10
Registered: July 2009
Location: USA
Junior Member
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 08:51 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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: Mon May 06 14:53:31 GMT 2024

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

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

Back to the top