Eclipse plugin 如何使用多个<;instanceof>;条件在<;何时可见>;?

Eclipse plugin 如何使用多个<;instanceof>;条件在<;何时可见>;?,eclipse-plugin,eclipse-rcp,instanceof,Eclipse Plugin,Eclipse Rcp,Instanceof,弹出菜单出现有两个条件,我在plugin.xml中的标记中使用?我使用了……,但它似乎不起作用。下面是代码 <visibleWhen> <with variable="selection"> <iterate ifEmpty="false" operator="or"> <instanceof value="o

弹出菜单出现有两个条件,我在plugin.xml中的
标记中使用
?我使用了
……
,但它似乎不起作用。下面是代码

 <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>

任何输入都会非常有用

谢谢,
阿巴斯

我认为您使用的
是错误的(请参阅):



谢谢Alexey。的用法不正确,正如你正确指出的那样。这有点令人困惑,但这就是它的工作原理!我注意到你没有投票,即使你已经接受了答案。见Alexey,我需要至少15个声望点才能做到这一点:)
<with variable="selection">
    <iterate ifEmpty="false" operator="or">
        <or>
            <and>
                 <instanceof value="org.eclipse.core.resources.IFolder"/>
                 <test property="org.eclipse.core.resources.projectNature" 
                       value="org.eclipse.wst.jsdt.core.jsNature"/>
            </and>
            <and>
                 <instanceof value="org.eclipse.core.resources.IProject"/>
                 <test property="org.eclipse.core.resources.projectNature" 
                       value="org.eclipse.wst.jsdt.core.jsNature"/>
            </and>
       </or>
   </iterate>
</with>