Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 35324 - [Contributions] ActionContributionItem.handleWidgetSelection wrong for MenuItems of RadioButton style
Summary: [Contributions] ActionContributionItem.handleWidgetSelection wrong for MenuIt...
Status: RESOLVED DUPLICATE of bug 34744
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-19 17:26 EST by Richard Kulp CLA
Modified: 2003-05-26 14:54 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 Richard Kulp CLA 2003-03-19 17:26:14 EST
If you have MenuItems of RadioButton style, the MenuItems automatically control
the selection behaviour. The problem is the
ActionContributionItem.handleWidgetSelection method overrides this behaviour and
is wrong. This can be seen when you have two RadioButton type MenuItems and you
select the item that is already selected. MenuItem will properly RESELECT the
item, but handleWidgetSelection will simply take the current selection state out
of the Action (ignoring the state in the MenuItem) and negate it. But since the
current state in the Action is true, it sets it to false. This then leaves no
menuitems selected, which is wrong.

For MenuItems, the checkbox and radiostyle are automatically handled by the
MenuItem (though they were handled incorrectly in 2.0.x) and the
ActionContributor should use the current value of the MenuItem selection. This
can also be called for Button, but it looks like Button also automatically
handles the style too. But that needs to be verified.

Thanks, Rich Kulp
Comment 1 Nick Edgar CLA 2003-03-21 12:46:36 EST
This is a dup, but I couldn't find the original PR.
Simon, please provide the recommended workaround.
Comment 2 Simon Arsenault CLA 2003-03-21 15:23:28 EST
See bug 34744 for a potential workaround. To be looked at in 2.2 stream.

*** This bug has been marked as a duplicate of 34744 ***