Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Welcome page for a single perspective
Welcome page for a single perspective [message #506454] Thu, 07 January 2010 10:10 Go to next message
Markus Schindler is currently offline Markus SchindlerFriend
Messages: 30
Registered: July 2009
Hi newsgroup,

I'm searching for a solution for following problem:

I have an rcp application with a few perspectives.
If the user switches to one special perspective (which is not the initial perspective), a welcome screen (or something that looks like a welcome
screen) should be displayed.
If the user clicks a link on the page, the welcome sceen should close.

I tried this with an IntroPart, but I doesn't get it work. It is to much "product" dependend. Could someone give me a hint.

Re: Welcome page for a single perspective [message #507274 is a reply to message #506454] Tue, 12 January 2010 17:33 Go to previous message
John Ormerod is currently offline John OrmerodFriend
Messages: 39
Registered: January 2010
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
Previous Topic:How to keep view open when changing perspective?
Next Topic:What does it means InternalPlatform.DEBUG_PLUGIN_PREFERENCES
Goto Forum:

Current Time: Wed Jun 20 00:21:11 GMT 2018

Powered by FUDForum. Page generated in 0.02492 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top