Eclipse e4 RCP: Core Expressions - Something less XML-hell?
问题 I'm working on an E4 RCP application, and have a context menu which has menu items visible or not depending on the selection. The way I've found to do this is with core expressions defined in the plugin.xml like so: <extension point="org.eclipse.core.expressions.definitions"> <definition id="com.foo.bar.test.core.expression"> <with variable="org.eclipse.ui.selection"> <iterate ifEmpty="false"> <or> <instanceof value="com.foo.bar.Class1"> </instanceof> <instanceof value="com.foo.bar.Class2"> <