Using IWorkbenchPage#hideEditor to confine editor to a single perspective [message #499322] |
Fri, 20 November 2009 14:20  |
Eclipse User |
|
|
|
I noticed the new API in 3.5 and I think it can help me fix a bug in my RCP
application. My use case confines editors to a single perspective (the
others just contain views). However, if I have open editors in the editor
perspective and switch to a non-editor perspective, I still see the editor
contributions to the toolbar and menus. I added an IPerspectiveListener to
"hide" all the editors when the editing perspective is deactivated, and
"show" them when it is activated. Two problems I've encountered:
1. Toolbar contributions always seem to be removed, but sometimes (not
always) the File menu still has Close and Close All enabled
2. When I return to the editor perspective, the "active" editor is always
the first editor instead of the one that was active when I left
Is this the right approach? Any suggestions on the above two issues?
Thanks
Will
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04300 seconds