Bug 329079 CCE thrown when trying to render a window with a part that's not visible
java.lang.ClassCastException: org.eclipse.swt.layout.FillLayout at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.childRendered(WBWRenderer.java:521) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:502) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:554) at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:58) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.processContents(WBWRenderer.java:456) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:490) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:554)
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		application.getDescriptors().add(descriptorA);
		MPartDescriptor descriptorB = org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicFactoryImpl.eINSTANCE
				.createPartDescriptor();
		descriptorB.setElementId("sharedB");
		descriptorB
				.setContributionURI("platform:/plugin/org.eclipse.e4.ui.tests/org.eclipse.e4.ui.tests.workbench.SampleView");
		application.getDescriptors().add(descriptorB);
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPartStack stack = BasicFactoryImpl.eINSTANCE.createPartStack();
		window.getChildren().add(stack);
		window.setSelectedElement(stack);
		application.setContext(appContext);
		appContext.set(MApplication.class.getName(), application);
		wb = new E4Workbench(application, appContext);
		wb.createAndRunUI(window);
		EPartService partService = window.getContext().get(EPartService.class);
		MPlaceholder placeholderA = partService.createSharedPart("sharedA");
		stack.getChildren().add(placeholderA);
		stack.setSelectedElement(placeholderA);
		MPart partA = (MPart) placeholderA.getRef();
		assertNotNull(partA.getObject());
		stack.setToBeRendered(false);
		assertNull(partA.getObject());
	}
	public void testRemoveGuiBug324228_1() {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();