문제

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