Bug 316298 [Compatibility] Support o.e.ui.menus visibleWhen
We need support in MCoreExpression for entire expressions created by the WorkbenchMenuService. They don't often use ReferenceExpressions to core expression definitions. PW
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java
import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.e4.ui.workbench.modeling.ExpressionContext;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Widget;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
 * Create a contribute part.
 */
public abstract class MenuItemRenderer extends SWTPartRenderer {
	static class VisibleRAT extends RunAndTrack {
		Expression exp;
		MMenuItem item;
		ExpressionContext ec;
		boolean participating = true;
		public VisibleRAT(MMenuItem i, Expression e, IEclipseContext c) {
			exp = e;
			item = i;
			ec = new ExpressionContext(c);
		}
		/*
		 * (non-Javadoc)
		 * 
		 * @see
		 * org.eclipse.e4.core.contexts.RunAndTrack#changed(org.eclipse.e4.core
		 * .contexts.IEclipseContext)
		 */
		@Override