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
&& (newLocation == EModelService.IN_SHARED_AREA || newLocation == EModelService.OUTSIDE_PERSPECTIVE)) {
					MWindow topWin = modelService.getTopLevelWindowFor(added);
					MPlaceholder addedPH = (MPlaceholder) added;
					List<MPlaceholder> phList = modelService.findElements(
							topWin, null, MPlaceholder.class, null);
					for (MPlaceholder ph : phList) {
						if (ph == addedPH)
							continue; 
						if (ph.getRef() == addedPH.getRef())
							ph.getParent().getChildren().remove(ph);
					}
				}
			} else if (UIEvents.EventTypes.REMOVE.equals(eventType)) {
				Activator.trace(Policy.DEBUG_RENDERER, "Child Removed", null); 
				MUIElement removed = (MUIElement) event
						.getProperty(UIEvents.EventTags.OLD_VALUE);
				
				
				if (!removed.isToBeRendered())
					return;
				if (removed.getWidget() instanceof Control) {
					Control ctrl = (Control) removed.getWidget();
					ctrl.setLayoutData(null);
					ctrl.getParent().layout(new Control[] { ctrl },
							SWT.CHANGED | SWT.DEFER);
				}
				
				
				if (changedElement.getSelectedElement() == removed)
					changedElement.setSelectedElement(null);