|Re: Welcome page for a single perspective [message #507274 is a reply to message #506454]
||Tue, 12 January 2010 17:33
| John Ormerod
Registered: January 2010
I think you could handle this by using a PerspectiveListener (a class that implements IPerspectiveListener4). One of the methods in the interface is perspectiveActivated(), which (from memory) I think is the one that gets invoked when the user selects a new perspective. When a perspective is opened, the perspectiveOpened() method is invoked.
One of the parameters is the PerspectiveDescriptor, which allows you to determine when the perspective is your 'special' perspective. When it is, you can display your 'welcome' screen.
There is only one PerspectiveListener allowed, so I create mine in the WorkbenchWindowAdvisor#postWindowOpen():
IWorkbenchPage activePage = window.getActivePage();
When you say 'the welcome screen should close' - if you want the perspective to close, you have the info to do this:
activePage.closePerspective(specialPerspId, true, true);
Hope this helps.
Powered by FUDForum
. Page generated in 0.01525 seconds