In my plugin.xml I have defined multiple restrictions like:

<extension
      point="org.eclipse.core.expressions.definitions">
   <definition id="my.stuff.readAccess1">
      <test>...</test>
   </definition>
   <definition id="my.stuff.readAccess2">
      <test>...</test>
   </definition>
</extension>

In my fragment.e4xmi file I would like to use multiple of these for a simple HandledMenuItem as a Visible-When Expression with a conjuction, is that possible somehow?

My issue is that I have many roles and other restrictions (this menu should be seen only in a specific perspective, etc.), and having to create a CoreExpression for all the menu items one-by-one seems a bit cumbersome.

Any hints if that could be avoided? Thanks in advance!

有帮助吗?

解决方案

You can only specify the one core expression, but you can combine other expressions using and and or:

  <definition
        id="my.stuff.readAccess1and2">
       <and>
          <reference
                 definitionId="my.stuff.readAccess1">
          </reference>
          <reference
                 definitionId="my.stuff.readAccess2">
           </reference>
      </and>
  </definition>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top