[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: please help

nalini wrote:
My action has access to an IWorkbenchWindow instance, from which I have obtained a ITextEditor instance and an IDocument instance but I can't see where to go next. I will be thankful if you can please suggest how to solve the caret position problem..

I believe you can use ITextEditor's getSite().getSelectionProvider().setSelection(new TextSelection(offset, 0)) to move the cursor.


Regards,
Rem