[英]Eclipse RCP Plugin.xml Command binding enablement with a selection count of more than 1
我試圖在選擇2個或更多元素時啟用此命令。 這是我的plugin.xml的一個片段:
<binding
commandId="com.stackoverflow.commands.myCommand"
rank="100">
<enablement>
<and>
<count
value="2">
</count>
</and>
</enablement>
</binding>
顯然,這僅在選擇了恰好2個元素時才有效。 任何想法?
像這樣將<not>
與<or>
一起使用:
<binding
commandId="com.stackoverflow.commands.myCommand"
rank="100">
<enablement>
<not>
<or>
<count value="0" />
<count value="1" />
</or>
</not>
</enablement>
我沒有嘗試過,但是應該可以。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.