Bug 335444 Detached windows do not get rendered automatically
I20110125-2200 1. F1 2. Detach the 'Help' view. 3. It has now disappeared. 4. Pressing 'F1' again does nothing. Resetting the perspective doesn't help. Closing and reopening the perspective doesn't help. Restarting doesn't help. If you restart the 'Help' view will appear in a detached window.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
assertEquals(partContext, perspectiveContext1.getActiveChild());
		EPartService partService = window.getContext().get(EPartService.class);
		partService.switchPerspective(perspective2);
		IEclipseContext perspectiveContext2 = perspective2.getContext();
		assertEquals(partContext, perspectiveContext1.getActiveChild());
		assertEquals(perspectiveContext2, partContext.getParent());
		assertEquals(partContext, perspectiveContext2.getActiveChild());
		partService.hidePart(part);
		assertEquals(perspectiveContext1, partContext.getParent());
		assertEquals(partContext, perspectiveContext1.getActiveChild());
		assertNull(
				"perspective2 doesn't have any parts, it should not have an active child context",
				perspectiveContext2.getActiveChild());
	}
	public void testBug334644_01() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		window.setToBeRendered(false);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(application);
		assertNull("No widget for an unrendered window", window.getWidget());
		assertNull("No context for an unrendered window", window.getContext());
		window.setToBeRendered(true);
		assertNotNull("Rendered window should have a widget",
				window.getWidget());