Skip to main content



      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 05:10 Go to next message
Eclipse UserFriend
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.

Regards,
Markus
Re: Welcome page for a single perspective [message #507274 is a reply to message #506454] Tue, 12 January 2010 12:33 Go to previous message
Eclipse UserFriend
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: Tue Jul 15 06:59:47 EDT 2025

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

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

Back to the top