Bug 295250 ContributedPartRenderer eagerly activates constructed parts in createWidget
I was wondering why my part was becoming active when I noticed the two lines of code below in CPR... parentContext.set(IContextConstants.ACTIVE_CHILD, localContext); activate(element); This eager activation is in direct conflict with the 3.x IWorkbenchPage's showView method with a IWorkbenchPage.VIEW_CREATE mode passed in.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
service.activate(partB);
		assertEquals(1, tabFolder.getSelectionIndex());
	}
	public void testPartStack_SetActiveChild2() throws Exception {
		MApplication application = MApplicationFactory.eINSTANCE
				.createApplication();
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		MWindow window = MApplicationFactory.eINSTANCE.createWindow();
		application.getChildren().add(window);
		MPartStack stack = MApplicationFactory.eINSTANCE.createPartStack();
		window.getChildren().add(stack);
		MPart partA = MApplicationFactory.eINSTANCE.createPart();
		partA.setId("partA");
		partA.setURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		MPart partB = MApplicationFactory.eINSTANCE.createPart();
		partB.setId("partB");
		partB.setURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		stack.getChildren().add(partA);
		stack.getChildren().add(partB);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		CTabFolder tabFolder = (CTabFolder) stack.getWidget();
		assertEquals(0, tabFolder.getSelectionIndex());
		EPartService service = (EPartService) window.getContext().get(
				EPartService.class.getName());
		service.showPart(partB.getId());
		assertEquals(1, tabFolder.getSelectionIndex());
	}
	public void testPartStack_SetActiveChild3() throws Exception {