|
Re: Welcome page for a single perspective [message #507274 is a reply to message #506454] |
Tue, 12 January 2010 17:33 |
John Ormerod Messages: 39 Registered: January 2010 |
Member |
|
|
Hi Markus
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();
activePage.getWorkbenchWindow().addPerspectiveListener(new PerspectiveListener());
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.
Regards, John
|
|
|
Powered by
FUDForum. Page generated in 0.03118 seconds