Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to move the CURSOR LOCATION programatically
How to move the CURSOR LOCATION programatically [message #110652] Tue, 12 August 2003 22:00 Go to next message
Eclipse UserFriend
Hi all,

I like to know how can I move the cursor of my editor to a specified
location without using the keyboard.For example if i enter (4,5) values to
the method that take care of the curosr location then the cursor should
move to that location.

Syed
Re: How to move the CURSOR LOCATION programatically [message #110676 is a reply to message #110652] Tue, 12 August 2003 22:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kyrra.iwichita.com

I'm not really sure about it in Eclipse, but SWT uses an object called
"Caret" to keep track of the cursor.

-James

Syed wrote:
> Hi all,
>
> I like to know how can I move the cursor of my editor to a specified
> location without using the keyboard.For example if i enter (4,5) values to
> the method that take care of the curosr location then the cursor should
> move to that location.
>
> Syed
>
Re: How to move the CURSOR LOCATION programatically [message #110688 is a reply to message #110676] Tue, 12 August 2003 22:31 Go to previous messageGo to next message
Eclipse UserFriend
alright, that seems to make logic but can I enter my values into that
object so that it moves to the specified location.
Actually I like to move the cursor/caret of EditorA when the caret of
editorB moves.

Syed

James Wendel wrote:

> I'm not really sure about it in Eclipse, but SWT uses an object called
> "Caret" to keep track of the cursor.

> -James

> Syed wrote:
> > Hi all,
> >
> > I like to know how can I move the cursor of my editor to a specified
> > location without using the keyboard.For example if i enter (4,5) values to
> > the method that take care of the curosr location then the cursor should
> > move to that location.
> >
> > Syed
> >
Re: How to move the CURSOR LOCATION programatically [message #110853 is a reply to message #110688] Wed, 13 August 2003 12:46 Go to previous message
Eclipse UserFriend
Originally posted by: tom.eicher.gmx.ch.nodomain

Use the editor's selection provider.

AbstractTextEditor editor;
ISelectionProvider provider= editor.getSelectionProvider();
provider.setSelection(new TextSelection(<position>, 0);

HTH, tom


Syed wrote:

> alright, that seems to make logic but can I enter my values into that
> object so that it moves to the specified location.
> Actually I like to move the cursor/caret of EditorA when the caret of
> editorB moves.
>
> Syed
>
> James Wendel wrote:
>
>
>>I'm not really sure about it in Eclipse, but SWT uses an object called
>>"Caret" to keep track of the cursor.
>
>
>>-James
>
>
>>Syed wrote:
>>
>>>Hi all,
>>>
>>>I like to know how can I move the cursor of my editor to a specified
>>>location without using the keyboard.For example if i enter (4,5) values to
>>>the method that take care of the curosr location then the cursor should
>>>move to that location.
>>>
>>>Syed
>>>
>
>
>
Previous Topic:Text Editing, ability to join lines
Next Topic:editor shared menu action
Goto Forum:
  


Current Time: Mon Oct 27 06:37:52 EDT 2025

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

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

Back to the top