Bug 334644 Cannot manually un/render a window that's directly under the application
Setting the 'toBeRendered' flag for a window that's a direct child of an application does nothing. The workaround is to manually de/construct it via the IPresentationEngine.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
window.getChildren().add(perspectiveStack);
		window.setSelectedElement(perspectiveStack);
		MPerspective perspective = AdvancedFactoryImpl.eINSTANCE
				.createPerspective();
		perspectiveStack.getChildren().add(perspective);
		perspectiveStack.setSelectedElement(perspective);
		MPlaceholder placeholder = AdvancedFactoryImpl.eINSTANCE
				.createPlaceholder();
		placeholder.setRef(part);
		part.setCurSharedRef(placeholder);
		perspective.getChildren().add(placeholder);
		perspective.setSelectedElement(placeholder);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		assertNotNull(part.getObject());
		appContext.get(IPresentationEngine.class).removeGui(perspective);
		assertNull(part.getObject());
	}
	public void testBug324839() throws Exception {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		application.setContext(appContext);
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		window.getChildren().add(partStack);
		window.setSelectedElement(partStack);