1
彈出式菜單出現有兩個條件,我在我的plugin.xml中的<visibleWhen>
標記內使用<instanceof..>
?我已經使用了<or>...<instance of>...</or>
,但它似乎沒有工作。以下是密碼如何在<visibleWhen>中使用多個<instanceof>條件?
<visibleWhen>
<with variable="selection">
<iterate ifEmpty="false" operator="or">
<instanceof value="org.eclipse.core.resources.IFolder"/>
<test property="org.eclipse.core.resources.projectNature"
value="org.eclipse.wst.jsdt.core.jsNature"/>
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<test property="org.eclipse.core.resources.projectNature"
value="org.eclipse.wst.jsdt.core.jsNature"/>
</or>
</iterate>
</with>
</visibleWhen>
任何輸入都會非常有幫助!
感謝, 阿巴斯
我注意到你有沒有投任何票,即使你已經接受的答案。見http://stackoverflow.com/faq#howtoask –
阿列克謝,我需要至少15個回報點來做到這一點:) – Abbas
糟糕,沒錯。對不起:) –