| Open Editor with Double Click [message #284814] |
Mon, 02 May 2005 16:18  |
Eclipse User |
|
|
|
Originally posted by: venkatrj.gmail.com
hi,
I have a custom view and a custom editor. When I click an object in the
view, an editor has to be opened. My editor is a form based editor. I am
not able to figure out what action delegate is to be implemented.
private void hookDoubleClickAction() {
viewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
handleDoubleClick(event);
}
});
}
private void handleDoubleClick(DoubleClickEvent event){
OpenSimpleFormEditorAction Osfea = new
OpenSimpleFormEditorAction();
Osfea.run();
}
I am using the following code to open the editor.
IWorkbenchPage page = window.getActivePage();
page.openEditor(input, editorId);
The problem is, I am not able to get the active page from a window unless
I extend the IWorkbenchActionDelegate Interface (hence, I am able to open
an editor from the global menubar but not from the view).
i) How do I open the editor by double clikcing an object in a view?
ii) Is it possible to populate the forms' pages inside the editor
dynamically based on the object that has been clicked? If yes, could you
provide me some insight on how to achive this?
thanks a ton.
-venkat
|
|
|
|
Powered by
FUDForum. Page generated in 0.04173 seconds