Community
Participate
Working Groups
From Eclipse Corner (6/13/2001): It seems some obvious functionality is missing from IWorkbench. We need to know when a new workbench window is opened or an existing one closed. For example: IWorkbench.addWorkbenchListener(IWorkbenchListener) IWorkbenchListener would contain, among other methods, windowOpened(IWorkbenchWindow) windowClosed(IWorkbenchWindow) etc... I've found a workaround. However, this is very ugly and it would be great if someone could give an estimate when real listener support could be added to IWorkbench. I'm adding a ShellListener to the current WorkbenchWindow's shell. When I get a shellDeactivated, I check to see what the activeWorkBenchWindow is. If its not the original window, I know I've got a new one. I've discovered I must do the check in an asyncExec, because at the time shellDeactivated is called, the original workbench window is still the active one. NOTES:
PRODUCT VERSION: 125
Should add for 2.0. There was also a recent newsgroup request for this.
Fixed and released. IWindowListener has the following methods: public void windowActivated(IWorkbenchWindow window); public void windowDeactivated(IWorkbenchWindow window); public void windowClosed(IWorkbenchWindow window); public void windowOpened(IWorkbenchWindow window);
Released.