|
Re: Prevent loading a perspective [message #525360 is a reply to message #525346] |
Tue, 06 April 2010 07:00   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03616 seconds