質問

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