Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Need to keep track of the cursor offset in a TextEditor plugin
Need to keep track of the cursor offset in a TextEditor plugin [message #262439] Mon, 19 July 2004 14:42 Go to next message
Eclipse UserFriend
Originally posted by: oleg.configurecode.com

Dear Distinguished Colleagues:

I need to be able to keep track of the cursor offset; i.e. every time
the user moves a cursor, I need to be able to notify a listener of the
new character offset that the cursor is pointing at. It doesn't need to
be in real time, a small delay is ok so I can do it using a thread.

Any thoughts ?

Oleg
Re: Need to keep track of the cursor offset in a TextEditor plugin [message #262580 is a reply to message #262439] Tue, 20 July 2004 06:48 Go to previous messageGo to next message
Eclipse UserFriend
have a look at IPostSelectionProvider - the ISelectionProvider returned
from ITextEditor.getSelectionProvider may implement it.

-tom

Oleg wrote:
> Dear Distinguished Colleagues:
>
> I need to be able to keep track of the cursor offset; i.e. every time
> the user moves a cursor, I need to be able to notify a listener of the
> new character offset that the cursor is pointing at. It doesn't need to
> be in real time, a small delay is ok so I can do it using a thread.
>
> Any thoughts ?
>
> Oleg
Re: Need to keep track of the cursor offset in a TextEditor plugin [message #262616 is a reply to message #262580] Tue, 20 July 2004 09:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oleg.configurecode.com

I think it is different... Selection changed event is not triggered, not
even for selecting a region of text...

Oleg

Tom Eicher wrote:
> have a look at IPostSelectionProvider - the ISelectionProvider returned
> from ITextEditor.getSelectionProvider may implement it.
>
> -tom
>
> Oleg wrote:
>
>> Dear Distinguished Colleagues:
>>
>> I need to be able to keep track of the cursor offset; i.e. every time
>> the user moves a cursor, I need to be able to notify a listener of the
>> new character offset that the cursor is pointing at. It doesn't need
>> to be in real time, a small delay is ok so I can do it using a thread.
>>
>> Any thoughts ?
>>
>> Oleg
Re: Need to keep track of the cursor offset in a TextEditor plugin [message #262845 is a reply to message #262616] Wed, 21 July 2004 05:57 Go to previous message
Eclipse UserFriend
Oleg wrote:
> I think it is different... Selection changed event is not triggered, not
> even for selecting a region of text...

Not sure what you mean - yes, you should get SelectionChangedEvents once
you register as listener!

-t
Previous Topic:Increase tab width in Java editor
Next Topic:Multi JVM enviroment to start Eclipse 3.0
Goto Forum:
  


Current Time: Sat Jun 21 05:23:04 EDT 2025

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

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

Back to the top