| How to move the CURSOR LOCATION programatically [message #110652] |
Tue, 12 August 2003 22:00  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03986 seconds