Question

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!

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top