| [pde-core-dev] File I/O |
|
Hi,
I would like to know the way one can modify
the opened file in response to an action in the Workbench UI (say my custom
menu's action). Let me be more clear :
Say I
created my Menu, call it MyMenu with 2 menu-items m1 and m2. Now i click on m1
or m2 I want to push some custom-code into the opened JSP file. So, how do
I get hold of this....just see the snippet...
workbench = window.getWorkbench(); activeWindow = workbench.getActiveWorkbenchWindow(); activePage = activeWindow.getActivePage(); shell = activeWindow.getShell(); activeEditor = activePage.getActiveEditor(); editorInput = activeEditor.getEditorInput(); adaptable = activePage.getInput(); file = (IFile)adaptable.getAdapter(); // This I cannot do for obvious reasons........How do I go about it now....... ??? Thanks in advance. Regards Krisna |