Bug 319004 CCE caused by PartRenderingEngine assuming a parent eContainer() is an MElementContainer
An MMenu's container could be an MPart, which leads to a CCE in createGui(MUIElement).
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.java
&& (parent == null || parent.getWidget() == null || menuChild))
				return;
			if (changedElement.isToBeRendered()) {
				Activator.trace(Policy.DEBUG_RENDERER, "visible -> true", null); 
				
				Object w = createGui(changedElement);
				if (w instanceof Control && !(w instanceof Shell)) {
					fixZOrder(changedElement);
				}
			} else {
				Activator
						.trace(Policy.DEBUG_RENDERER, "visible -> false", null); 
				
				
				if (parent.getSelectedElement() == changedElement)
					parent.setSelectedElement(null);
				
				removeGui(changedElement);
			}
		}
	};
	private EventHandler visibilityHandler = new EventHandler() {
		public void handleEvent(Event event) {
			MUIElement changedElement = (MUIElement) event
					.getProperty(UIEvents.EventTags.ELEMENT);
			MElementContainer<MUIElement> parent = changedElement.getParent();
			if (parent == null)
				return;
			AbstractPartRenderer renderer = (AbstractPartRenderer) parent
					.getRenderer();