Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Detect cursor movement(in a plugin)
Detect cursor movement [message #869594] Thu, 03 May 2012 16:57 Go to next message
Kitesurfer () is currently offline Kitesurfer ()Friend
Messages: 84
Registered: December 2009
Member
Hello,

I have a plugin with an editor which implements AbstractDecoratedTextEditor.
How can I detect when the cursor is moved ? ... should I add some kind of listener in my editor ? ... example code would be great !

Thanks.
Re: Detect cursor movement [message #869765 is a reply to message #869594] Fri, 04 May 2012 09:03 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 03.05.2012 18:57, Kitesurfer Mising name wrote:
> Hello,
>
> I have a plugin with an editor which implements
> AbstractDecoratedTextEditor.
> How can I detect when the cursor is moved ? ... should I add some kind
> of listener in my editor ? ... example code would be great !
See
org.eclipse.ui.texteditor.AbstractTextEditor.handleCursorPositionChanged()

Dani
>
> Thanks.
Re: Detect cursor movement [message #870383 is a reply to message #869765] Mon, 07 May 2012 21:20 Go to previous message
Kitesurfer () is currently offline Kitesurfer ()Friend
Messages: 84
Registered: December 2009
Member
Thanks that's what I was looking for, thanks.
It has some unexpected behaviour though ... it als "fires" when the mouse is moved over the editor ... then the cursorposition doesn't change for me. But oke ... I've inplemented it, and it works.
Previous Topic:Trouble with HATS Build
Next Topic:Remote Search
Goto Forum:
  


Current Time: Thu Dec 18 16:24:44 GMT 2014

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

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