Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 386917

Summary: Perspective initial layout for views with allow multiple = true (compound ids)
Product: [Eclipse Project] Platform Reporter: Sergey Kuznetsov <sku406>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: bsd, emoffatt, pwebster, tom.schindl
Version: 4.2   
Target Milestone: 4.3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Test Project attachment none

Description Sergey Kuznetsov CLA 2012-08-09 07:13:15 EDT
RCP workbench does not create initial layout for views with compound id (viewid:viewsecondaryid). Neither window.getActivePage().resetPerspective() works.

To reproduce just create simple "RCP application with a view" project and add following code to Perspective class:

	public IFolderLayout	viewsTopLeft;
	public String			viewsTopLeftID = "viewsTopLeft";
	public IFolderLayout	viewsTopRight;
	public String			viewsTopRightID = "viewsTopRight";
	public IFolderLayout	viewsBottom;
	public String			viewsBottomID = "viewsBottom";

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.setFixed(false);

		viewsTopLeft = layout.createFolder(viewsTopLeftID, IPageLayout.LEFT, 0.20f, editorArea);
		viewsBottom = layout.createFolder(viewsBottomID, IPageLayout.BOTTOM, 0.5f, viewsTopLeftID);
		viewsTopRight = layout.createFolder(viewsTopRightID, IPageLayout.RIGHT, 0.50f, viewsTopLeftID);

		viewsTopLeft.addView(View.ID + ":0001");
		viewsTopLeft.addView(View.ID + ":0002");
		viewsTopRight.addView(View.ID + ":0003");
		viewsTopRight.addView(View.ID + ":0004");
		viewsBottom.addView(View.ID + ":0005");
		viewsBottom.addView(View.ID + ":0006");
		viewsBottom.addView(View.ID + ":0007");
	}

Nothing will be created on first start, although same code works fine in 3.x.
Comment 1 Thomas Schindl CLA 2012-08-09 07:34:17 EDT
Can't you attach the full RCP?
Comment 2 Sergey Kuznetsov CLA 2012-08-09 08:22:17 EDT
Created attachment 219710 [details]
Test Project attachment

Sure. Attached project can be imported from Indigo and Juno
Comment 3 Eric Moffatt CLA 2012-08-14 10:52:26 EDT
Sergey, thanks for the test app. We'll take a look into this soon and try to get a fix into the service packs.
Comment 4 Eric Moffatt CLA 2012-08-14 11:14:39 EDT

*** This bug has been marked as a duplicate of bug 383309 ***
Comment 5 Eric Moffatt CLA 2013-04-18 14:13:31 EDT
Sergey, this seems to be working in the latest builds, could you re-try this once M7 comes out just to be sure ?
Comment 6 Sergey Kuznetsov CLA 2013-04-19 04:30:00 EDT
Sure thing, I will.