Bug 214025 - [ActionSets] Changing MenuCreator of an Action object don't update ContributionItem
Summary: [ActionSets] Changing MenuCreator of an Action object don't update Contributi...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-12-30 14:17 EST by Patrik Dufresne CLA
Modified: 2021-10-04 14:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Dufresne CLA 2007-12-30 14:17:29 EST
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.
Comment 1 Paul Webster CLA 2008-01-07 10:18:57 EST
Do you mean for an dropdown action used in a menu (as opposed to a dropdown tool item)?

PW
Comment 2 Paul Webster CLA 2008-05-01 14:13:53 EDT
Please re-open with info.

PW
Comment 3 Patrik Dufresne CLA 2008-05-03 13:43:31 EDT
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.
Comment 4 Paul Webster CLA 2008-05-03 19:03:28 EDT
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
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:08:32 EDT
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.
Comment 6 Eclipse Genie CLA 2021-10-04 14:26:11 EDT
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.