Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » a method to change current cursor position?
a method to change current cursor position? [message #214568] Mon, 22 March 2004 21:57 Go to next message
Eclipse UserFriend
Originally posted by: nilushi_sam.yahoo.com

Hi,

i can get the current cursor position through the following line of code
((ITextSelection)editor.getSelectionProvider().getSelection( )).getOffset();

please provide me a method which i can use to change the current cursor
position.

thanks in advance
Re: a method to change current cursor position? [message #214956 is a reply to message #214568] Tue, 23 March 2004 18:36 Go to previous messageGo to next message
Michael Keppler is currently offline Michael KepplerFriend
Messages: 164
Registered: July 2009
Senior Member
nilushi schrieb:

> please provide me a method which i can use to change the current cursor
> position.

I'm currently searching the same and used something like the following,
but was not yet succesful with changing the position:

TextSelection selection =new TextSelection(
document,start,length);
editor.getSelectionProvider().setSelection(selection);

If you get a solution running, please provide your ideas.

Ciao, Michael.
Re: a method to change current cursor position? [message #215439 is a reply to message #214956] Wed, 24 March 2004 18:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nilushi_sam.yahoo.com

thanks for the reply, hope u'll be successful, will keep u updated with
any solution i get and hope that u'll do the same

regards
nilushi.

Michael Keppler wrote:

> nilushi schrieb:

> > please provide me a method which i can use to change the current cursor
> > position.

> I'm currently searching the same and used something like the following,
> but was not yet succesful with changing the position:

> TextSelection selection =new TextSelection(
> document,start,length);
> editor.getSelectionProvider().setSelection(selection);

> If you get a solution running, please provide your ideas.

> Ciao, Michael.
Re: a method to change current cursor position? [message #1076258 is a reply to message #214568] Wed, 31 July 2013 03:28 Go to previous message
Roberto Oliveira is currently offline Roberto OliveiraFriend
Messages: 5
Registered: July 2013
Junior Member
hey there,

I saw this topic without a solution and I am trying to do this too...any of you guys found a solution?

Thank's
Previous Topic:RCP app,: pb with KEPLER when moving views inside a perspective
Next Topic:Missing Libraries/jars?
Goto Forum:
  


Current Time: Thu Apr 25 14:26:25 GMT 2024

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

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

Back to the top