|ActionDelegateHandlerProxy and isEnabled [message #541213]
||Fri, 18 June 2010 17:31
|| Mickael Istria
Registered: July 2009
Location: Grenoble, France
I am trying to get my menu entries activated at the right time, but I am a bit confused with the ActionDelegateHandlerProxy. Indeed, I have a pop-up menu that defines an action for Copy, and this action is bound to the org.eclipse.ui.edit.copy command, in order to get the keyboard shortcuts working.
However the side effect of it is that this action registers a ActionDelegateHandlerProxy to the org.eclipse.ui.edit.copy command, and that ActionDelegateHandlerProxy has its isEnabled method returning true even if the selection does not match the <enablement/> definition of the action in the plugin.xml. In that case, the action that is wrapped in ActionDelegateHandlerProxy is null, and then the isEnabled return true.
I thougnt that a wrapper with a null action should rather cause enablment to be false... Is there something I misunderstood here to get my enablement correctly updated?
Thanks in advance
Mickael Istria - BonitaSoft S.A.
Powered by FUDForum
. Page generated in 0.08820 seconds