Bug 315907 Render menus on SWT.Show
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/modeling/ContextMenuListener.java
private MPopupMenu mmenu;
	private IPresentationEngine renderer;
	private IEclipseContext tmpContext;
	private MPart part;
	private MApplication application;
	private ArrayList<MMenuElement> menuContributionsToRemove = new ArrayList<MMenuElement>();
	public ContextMenuListener(IPresentationEngine renderer, MPopupMenu mmenu,
			MPart part, MApplication application) {
		this.renderer = renderer;
		this.mmenu = mmenu;
		this.part = part;
		this.application = application;
	}
	public void handleEvent(Event event) {
		if (event.widget == null || event.widget.isDisposed()) {
			return;
		}
		final Menu menu = (Menu) event.widget;
		switch (event.type) {
		case SWT.Show:
			tmpContext = (IEclipseContext) part.getContext().getLocal(
					IContextConstants.ACTIVE_CHILD);
			part.getContext().set(IContextConstants.ACTIVE_CHILD,
					mmenu.getContext());
			showMenu(menu);
			break;
		case SWT.Hide:
			hideMenu(menu);
			break;