Community
Participate
Working Groups
Build ID: M20070921-1145 Steps To Reproduce: Calling setMenuCreator() function of an Action object doesn't update the associated widget. More information: Action object of the jFace library must be modify to fire a propertyChanged message when the MenuCrator are change. Also, ActionContributionItem must update MenuItem when receiving this message.
Do you mean for an dropdown action used in a menu (as opposed to a dropdown tool item)? PW
Please re-open with info. PW
Action object in JFace library have a method named setMenuCreator(IMenuCreator creator). As describe in SWT documentation, this method are used to set the menu creator for this action. When I create the action, I set a default MenuCreator. For some reason, I want to change the MenuCreator of this action. A legitimate try is to call an second time setMenuCreator() with a new menuCreator. If I do so, ActionContributionItem doesn't update the state of the associated widget (menuItem, toolBarItem, etc.). As mention in first description, Action object must notify listener by calling propertyChanged() method and ActionContributionItem must handle this change.
It doesn't say that IAction should fire a change event when setMenuCreator(*) is called. The common pattern (and this is old API) is to set one menu creator and update it as needed. Something like the Run button does, where the run dropdown menu must display the last N launch configs used). setMenuCreator(*) is API (unfortunately) that allows you to tie your action "abstraction" directly to the underlying widgets, bypassing the rendering engine. PW
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.