Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Insert text into currently selected editor window
Insert text into currently selected editor window [message #142821] Sun, 12 October 2003 20:54 Go to next message
Donald G. Dunne is currently offline Donald G. DunneFriend
Messages: 1
Registered: July 2009
Junior Member
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
Re: Insert text into currently selected editor window [message #142968 is a reply to message #142821] Mon, 13 October 2003 09:34 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:How to remove the task which marked with error sign
Next Topic:Class loader problem with headless application in runtime workbench
Goto Forum:
  


Current Time: Thu Apr 25 15:07:09 GMT 2024

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

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

Back to the top