Hooking into IWorkbenchPage.closeEditors [message #499441] |
Sun, 22 November 2009 11:15  |
Eclipse User |
|
|
|
I am writing an RCP application which is based on GMF. A diagram can consist of 1 or more editors. So when it is decided to close a diagram, the user clicks the 'close' button on the editor tab.
I would like to hook into that click and trigger the closure of all the 'child' editors of that editor.
I've searched up and down for the relevant extension point, listeners, etc... but came up with nothing.
Sadly, I have no sample code to attach.
Thanks,
Hayden
|
|
|
|
Re: Hooking into IWorkbenchPage.closeEditors [message #499517 is a reply to message #499505] |
Mon, 23 November 2009 02:44  |
Eclipse User |
|
|
|
I did see the IPartListener, but I'm a little concerned that the user experience might be a little strange, since I'll be plugging in my logic a little late in the process.
For example, will I be able to invoke IWorkbenchPage.closeEditors from within the callback of partClosed(). How do I create a' 'request' to close the other editors, asynchronously, so that when the UI 'has time' it will close the other editors?
btw, I would have liked it to be collated together from the beginning, so that the prompt for save can be done in one action. Now, if my main page needs saving, I'll get that prompt, and only when it's saved, will it prompt for the other pages to be saved. A slight usability glitch that I'd like to avoid if possible.
Any suggestions with both issues?
|
|
|
Re: Hooking into IWorkbenchPage.closeEditors [message #603499 is a reply to message #499505] |
Mon, 23 November 2009 02:44  |
Eclipse User |
|
|
|
I did see the IPartListener, but I'm a little concerned that the user experience might be a little strange, since I'll be plugging in my logic a little late in the process.
For example, will I be able to invoke IWorkbenchPage.closeEditors from within the callback of partClosed(). How do I create a' 'request' to close the other editors, asynchronously, so that when the UI 'has time' it will close the other editors?
btw, I would have liked it to be collated together from the beginning, so that the prompt for save can be done in one action. Now, if my main page needs saving, I'll get that prompt, and only when it's saved, will it prompt for the other pages to be saved. A slight usability glitch that I'd like to avoid if possible.
Any suggestions with both issues?
|
|
|
Powered by
FUDForum. Page generated in 0.14839 seconds