How to keep view open when changing perspective? [message #484405] |
Mon, 07 September 2009 08:12  |
Eclipse User |
|
|
|
Hi,
I have two perspective that should show the same view at the bottom part
of the window. In the 'createInitialLayout()' method of both perspectives
I define a standalone placeholder like this:
layout.addStandaloneViewPlaceholder(InfoObjectsTableView.ID + "*:*",
IPageLayout.BOTTOM, 0.6f, editorAreaID, true);
However, when I open the view in one of the perspectives and then switch
to another - the view doesn't stay open. How can I make the view stay open
when a perspective is changed?
Thanks in advance,
Stanislav
|
|
|
|
|
Re: How to keep view open when changing perspective? [message #507259 is a reply to message #484440] |
Tue, 12 January 2010 11:34  |
Eclipse User |
|
|
|
Hi Stanislav
This might be a bit late! I've just been searching for an answer to this. There doesn't seem to be a definite one, but as the following worked for me, I thought it might help anyone looking for an answer.
In your WorkbenchWindowAdvisor#postWindowOpen() add the following:
try {
configurer.getWindow().getActivePage().showView("id-of-sticky-view ");
} catch (PartInitException e) {
// Handle exception
}
BTW, don't attempt tp open the sticky view in any createInitialLayout() method, since this view is not associated with a perspective.
Regards, John
|
|
|
Powered by
FUDForum. Page generated in 0.03633 seconds