Bug 297608 [UI] testCreateMenu fails
The 'testCreateMenu' test in the UI Test suite is now failing because of a regression introduced by the ui model refactoring.
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/PartRenderingEngine.java
* @param element
	 */
	public void removeGui(MUIElement element) {
		boolean needsDispose = true;
		if (element.getId() != null && element.getId().length() > 0) {
			RenderingRecord record = renderedWidgets.get(element.getId());
			if (record != null) {
				record.refCount--;
				needsDispose = record.refCount == 0;
			}
		}
		AbstractPartRenderer factory = getFactoryFor(element);
		assert (factory != null);
		MUIElement parent = element.getParent();
		AbstractPartRenderer parentFactory = parent != null ? getFactoryFor(parent)
				: null;
		if (parentFactory != null) {
			parentFactory.hideChild(element.getParent(), element);
		}
		if (factory != null && needsDispose)
			factory.disposeWidget(element);
		else
			System.out.println("Null factory in removeGui");
		
		if (element instanceof MContext) {
			MContext ctxt = (MContext) element;
			IEclipseContext lclContext = ctxt.getContext();
			ctxt.setContext(null);
			if (lclContext instanceof IDisposable) {
				((IDisposable) lclContext).dispose();