Community
Participate
Working Groups
Bugzilla – Bug 351313
[Contributions] selection should be the same as active menus election if the selection providers are the same
Last modified: 2012-06-07 07:18:21 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
Will investigate. A sample code to reproduce would be lot better.