Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351313 - [Contributions] selection should be the same as active menus election if the selection providers are the same
Summary: [Contributions] selection should be the same as active menus election if the ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 07:47 EDT by Missing name CLA
Modified: 2020-03-25 15:46 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-07-06 07:47:59 EDT
Build Identifier: 20110218-0911

This problems occurs in a view containing a (Tree)Viewer and a context menu. The viewpart and the context menu use both the viewer to contribute to the selection. If the context menu is open through a right click the selection for the context menu is not updated correctly.

For example consider a view with two items and a context menu with one entry:
The first item is currently selected. Then the second is right-clicked to open the context menu (at the same time the selection in the viewer changes) and then the menu entry is clicked. Inside the execution method of the handler which handles the command (sent by the context menu) the current selection is still the old one containing item1 instead of item2


Reproducible: Always

Steps to Reproduce:
1. Create a viewpart with a viewer and a context menu
2. Set the selection provider of the viewpart and the context menu to the viewer
3. connect a command to an menu item in the context menu
4. connect the command with a handler
5. check the result of HandlerUtil.getCurrentSelection(event) inside the execute method of the handler
Comment 1 Prakash Rangaraj CLA 2011-07-07 23:29:23 EDT
Will investigate. A sample code to reproduce would be lot better.
Comment 2 Eclipse Genie CLA 2020-03-25 15:46:24 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.