Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Prevent loading a perspective
icon5.gif  Prevent loading a perspective [message #525346] Tue, 06 April 2010 02:06 Go to next message
Eclipse UserFriend
Hey all,

is there a way to prevent that a special perspective is loaded at startup? I registered a perspectivelistener, but i could not find a way to stop loading the perspective, my only solution until now was to close the perspective after being loaded. But this is not a good way, so is there any other solution?

Thanks alot
Thomas
Re: Prevent loading a perspective [message #525360 is a reply to message #525346] Tue, 06 April 2010 07:00 Go to previous messageGo to next message
Eclipse UserFriend
On 06.04.2010 08:06, T. Wilhelm wrote:
> is there a way to prevent that a special perspective is loaded at
> startup? I registered a perspectivelistener, but i could not find a way
> to stop loading the perspective, my only solution until now was to close
> the perspective after being loaded. But this is not a good way, so is
> there any other solution?

The question is, what kind of policy you want.
The RCP framework provides direct support for repeatedly
using the same initial perspective or to use the last
persisted perspective. The latter requires that you enable
the save-and-restore mechanism by invoking

configurer.setSaveAndRestore(true);

in the initialize function of your WorkbenchAdvisor implementation.

It is possible to build on top of these mechanisms a higher-level
mechanism. E.g. if you have an RCP with a login mechanism, you
can separately store the persisted perspective for each user.
In this scenario you can also realize a conditional perspective
selection within your WorkbenchAdvisor#getInitialWindowPerspectiveId.

To make the this possible, you must be able to transport the login state
from your IApplication to your WorkbenchAdvisor, which shouldn't
be too hard.

HTH & Greetings from Bremen,

Daniel Krügler
Re: Prevent loading a perspective [message #526169 is a reply to message #525360] Fri, 09 April 2010 02:06 Go to previous message
Eclipse UserFriend
Hey Daniel,

thanks for your answer, actually our problem is a little bit more komplex, but you made me think about everything and so we will implement a special layer, which is responsible for the perspective handling. We dont use the perspective extension point anymore, instead we implemented a Manager which can do Rights management and everything else Wink

Thanks anyway, greetings from Stuttgart!
Thomas
Previous Topic:Get the current active wizard page
Next Topic:Invalid Thread Access
Goto Forum:
  


Current Time: Tue Jun 24 09:57:09 EDT 2025

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

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

Back to the top