Community
Participate
Working Groups
Used the Eclipse RCP Template proto, to show the issues. Perspective.java has been modified to show the various cases. Case 1: Using IFolder.addPlaceholder, things works out as expected. package rcpmail; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, IPageLayout.ID_EDITOR_AREA); IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, IPageLayout.ID_EDITOR_AREA); folder.addPlaceholder(View.ID + ":*"); layout.setEditorAreaVisible( true); } } Plese refer to snap-shots Fig.1 Case 2: I wanted a invisible VIEW area, till the VIEWs are displayed, so replaced 'folder' with 'layout' package rcpmail; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, IPageLayout.ID_EDITOR_AREA); layout.addPlaceholder( View.ID + ":*", IPageLayout.TOP, 0.5f, IPageLayout.ID_EDITOR_AREA); layout.setEditorAreaVisible( true); } } As shown in Fig.2 the views are no more in their expected position. I am using Version: 3.2.0 Build id: I20051102-1600 Thanks Sanjay
Created attachment 33690 [details] SnapShot Using IFolder.addPlaceholder
Created attachment 33691 [details] SnapShot Using IPlageLayout.addPlaceholder
Sorry, there is a typo: IFolder.addPlaceholder, to be read as IFolderLayout.addPlaceholder
Try modifying case 1 to use createPlaceholderFolder instead of createFolder. The second case should work similarly though.
Thanks for the solution. Sorry, for being a bit late on the feedback, as was not checking for a while. I didnot understand, why someone would need to use: IPlaceholderFolderLayout.createPlaceholderFolder(...).addPlaceholder(viewId) when there is a similar method: IPageLayout.addPlaceholder(String viewId, int relationship, float ratio, String refId), intutively is supposed to do the same thing
You're right, they should be equivalent, which is why this is still open. But does using a placeholder folder work for you?
Yes, eveything worked as I was expecting it to. Thanks a lot indeed on the solution.
Can you please let me know, how do I handle the following situation : PLUGIN A has perspective P with more than one placeholders defined as before: IFolderLayout topLeftFolder = ILayout.createPlaceholderFolder(...) IFolderLayout topRightFolder = ILayout.createPlaceholderFolder(...) IFolderLayout bottomFolder = ILayout.createPlaceholderFolder(...) I have PLUGIN B, which has VIEW V that needs to be gets displayed in 'topRightFolder'. Using org.eclipse.ui.perspectiveExtensions extension point, the problem is it gets displayed, when the application starts. Having the VISIBLE=FALSE, leaves a visible empty space. I am looking forward to a solution, just like it had been on one single plugin, where createPlaceholderFolder(...) just created an invisible empty slot, for the view to get positioned when it is invoked using showView(...) Thanks Sanjay
Is this still a problem in 3.3? PW
Changes requested on bug 193523
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.