Java Eclipse RCP Plugin.xml命令绑定启用,选择计数大于1

Java Eclipse RCP Plugin.xml命令绑定启用,选择计数大于1,java,xml,eclipse,eclipse-plugin,eclipse-rcp,Java,Xml,Eclipse,Eclipse Plugin,Eclipse Rcp,我试图在选择2个或更多元素时启用此命令。下面是我的plugin.xml的一个片段: <binding commandId="com.stackoverflow.commands.myCommand" rank="100"> <enablement> <and> <count value="2"> </count> </and> </enablement> </bind

我试图在选择2个或更多元素时启用此命令。下面是我的plugin.xml的一个片段:

<binding
  commandId="com.stackoverflow.commands.myCommand"
  rank="100">
 <enablement>
  <and>
   <count
    value="2">
   </count>
  </and>
 </enablement>
</binding>

这显然只在选择了两个元素时有效。有什么想法吗?

一起使用,如下所示:

<binding
    commandId="com.stackoverflow.commands.myCommand"
    rank="100">
<enablement>
<not>
    <or>
        <count value="0" />   
        <count value="1" />
    </or>
</not>
</enablement>

我还没试过,但应该可以用