How do I use perspective placeholders correctly? [message #869657] |
Thu, 03 May 2012 20:01 |
Nigel Daniels Messages: 66 Registered: July 2009 |
Member |
|
|
Hi,
I have created a perspective with the following folders:
IFolderLayout topLeftFolder = layout.createFolder("topLeft",
IPageLayout.LEFT, (float) 0.20, editorArea); // $NON-NLS-1$
IFolderLayout bottomLeftFolder = layout.createFolder("bottomLeft",
IPageLayout.BOTTOM, (float) 0.70, "topLeft"); // $NON-NLS-1$
IFolderLayout bottomFolder = layout.createFolder("bottom",
IPageLayout.BOTTOM, (float) 0.70, editorArea); // $NON-NLS-1$
So far I have added views directly but now I have a view I would like
the users to open as and when they need it. I would like this to appear
in the bottomFolder. To enable this I added the following:
bottomFolder.addView(IPageLayout.ID_PROP_SHEET);
bottomFolder.addPlaceholder(ChangeView.ID);
But when I open the view, using a command that calls:
HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().showView(ChangeView.ID);
The view opens across the entire bottom area and disappears as an item
is clicked in the editor. It does not open within the folders
placeholder. I have tried creating a placeholder folder:
IPlaceholderFolderLayout bottomPlaceholderFolder =
layout.createPlaceholderFolder("bottomPlaceholder", IPageLayout.BOTTOM,
(float) 0.70, editorArea); // $NON-NLS-1$
then adding the view using:
bottomPlaceholderFolder.addPlaceholder(ChangeView.ID);
Even doing this has the same result. Is there a step I am missing out or
have I misunderstood how the place holders work in perspectives?
Thanks for any advice,
Nigel
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02307 seconds