Modifying the editor's content [message #159736] |
Thu, 20 November 2003 16:29  |
Eclipse User |
|
|
|
Hello !
So, my plugin is a popup menu item from the JavaEditor's popup menu. My
code is called properly. Now I am trying to find a way to insert text in
the javaeditor.
My plugin is an IEditorActionDelegate so the methods I implement are :
public void run(IAction action)
public void setActiveEditor(IAction action, IEditorPart targetEditor)
So does anyone know how I can access the content of the editor from (I
guess) the IEditorPart instance ?
To be more precise, when the user right click in the java editor and
select my menu item, I want to insert some text at current position in the
text. So I need to get the caret's position which I know how to get, and I
need access to the text, to a way to update that text.
Any ideas ?
Max.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.48255 seconds