Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Controlling handler enablement based on multiple criteria
Controlling handler enablement based on multiple criteria [message #708585] Wed, 03 August 2011 01:01
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
I have a handler that should be enabled when the current selection contains at least one Foo, but no Bars. The following doesn't quite work (the handler is never enabled):

<handler class="TestHandler" commandId="test">
  <enabledWhen>
    <and>
      <iterate ifEmpty="false" operator="or">
        <instanceof value="Foo"/>
      </iterate>
      <iterate ifEmpty="true" operator="and">
        <not>
          <instanceof value="Bar"/>
         </not>
      </iterate>
    </and>
  </enabledWhen>
</handler>


Changing the 2nd ifEmpty/operator to and/false -> always disabled; or/false -> always enabled.

Suggestions?
Previous Topic:eclipse RCP and Swing
Next Topic:EXIT_RELAUNCH and eclipse.exitdata
Goto Forum:
  


Current Time: Thu Mar 28 11:32:14 GMT 2024

Powered by FUDForum. Page generated in 0.02596 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top