|
Re: Insert text into currently selected editor window [message #142968 is a reply to message #142821] |
Mon, 13 October 2003 09:34 |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Donald G. Dunne wrote:
>I've searched high and low to find an example of how to insert text into
>the currently selected editor window from a menu item.
>
>I've successfully added the menu item and it is calling back correctly.
>How do I grab the editor window and add text at the cursor location?
>
>I can't find any examples, postings or articles that discuss this.
>
>Thanks in advance,
>Don
>
>
>
Have a look at the ITextEditor and IDocument APIs.
Dani
|
|
|
Re: Insert text into currently selected editor window [message #148005 is a reply to message #142968] |
Wed, 22 October 2003 23:13 |
Eclipse User |
|
|
|
Originally posted by: steve.heswell.com
Daniel Megert wrote:
> Donald G. Dunne wrote:
> >I've searched high and low to find an example of how to insert text into
> >the currently selected editor window from a menu item.
> >
> >I've successfully added the menu item and it is calling back correctly.
> >How do I grab the editor window and add text at the cursor location?
> >
> >I can't find any examples, postings or articles that discuss this.
> >
> >Thanks in advance,
> >Don
> >
> >
> >
> Have a look at the ITextEditor and IDocument APIs.
> Dani
I'm trying to do exactly the same thing. Dani, could you give me any
moreinfo. I've looked at the interfaces you mention, I just can't figure
out how to get hold ogf the right interface from my editor action
|
|
|
Re: Insert text into currently selected editor window [message #148056 is a reply to message #148005] |
Thu, 23 October 2003 07:43 |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Steve H wrote:
>Daniel Megert wrote:
>
>
>
>>Donald G. Dunne wrote:
>>
>>
>
>
>
>>>I've searched high and low to find an example of how to insert text into
>>>the currently selected editor window from a menu item.
>>>
>>>I've successfully added the menu item and it is calling back correctly.
>>>How do I grab the editor window and add text at the cursor location?
>>>
>>>I can't find any examples, postings or articles that discuss this.
>>>
>>>Thanks in advance,
>>>Don
>>>
>>>
>>>
>>>
>>>
>>Have a look at the ITextEditor and IDocument APIs.
>>
>>
>
>
>
>>Dani
>>
>>
>I'm trying to do exactly the same thing. Dani, could you give me any
>moreinfo. I've looked at the interfaces you mention, I just can't figure
>out how to get hold ogf the right interface from my editor action
>
>
Have a look at AbstractTextEditor.createActions to see how to setup actions.
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.03490 seconds