[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Action enablement via keybinding with error at startup?

Hi,

I have problems with the enablement of actions when they are called via keybinding. I set the enablement (setEnabled()) in the selectionChanged method what works fine so far. But I noticed today that an action which is called via a keybinding is executed although the enablement is set to false. But this happens only at the first call after the rcp application start. After that everything is okay. Seems to me like a bug which should be reported?

Adam

Here my plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>

  <extension
        id="application"
        point="org.eclipse.core.runtime.applications">
     <application>
        <run
              class="de.play.rcp.Application">
        </run>
     </application>
  </extension>
  <extension
        point="org.eclipse.ui.perspectives">
     <perspective
           name="Perspective"
           class="de.play.rcp.Perspective"
           id="de.play.rcp.perspective">
     </perspective>
  </extension>
  <extension
        point="org.eclipse.ui.views">
     <view
           name="View"
           class="de.play.rcp.View"
           id="de.play.rcp.view">
     </view>
  </extension>
  <extension
        point="org.eclipse.ui.bindings">
     <key
           commandId="de.play.rcp.command1"
           schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
           sequence="F3">
     </key>
     <scheme
           id="de.play.rcp.scheme1"
           name="name">
     </scheme>
  </extension>
  <extension
        point="org.eclipse.ui.actionSets">
     <actionSet
           id="de.play.rcp.actionSet"
           label="actionSet"
           visible="true">
        <action
              class="de.play.rcp.actions.HotKeyAction"
              definitionId="de.play.rcp.command1"
              id="de.play.rcp.action1"
              label="action1"
              style="push"
              toolbarPath="additions">
        </action>
     </actionSet>
  </extension>
  <extension
        point="org.eclipse.ui.commands">
     <command
           id="de.play.rcp.command1"
           name="command1">
     </command>
  </extension>

</plugin>