Community
Participate
Working Groups
Build Identifier: 20110218-0911 If you select multiple items in a tree widget, and then click on one of the selected items, the others visually deselect but there is no selection event generated. Looking at StructuredViewer.handleSelect, the result of "getSelection()" when this code is reached is the selection of multiple items, not the new selection of a single item. This behavior apparently started in Eclipse 3.6.1 (Eclipse 3.6.0 works properly) As a workaround, we overrode StructuredViewer.handleSelect(SelectionEvent event) with the following: if (event.stateMask == 0) { Widget item = event.item; setSelection(Collections.singletonList(item)); } super.handleSelect(event); Reproducible: Always Steps to Reproduce: 1. Open the properties view in Eclipse 2. select a package in the Package Explorer 3. Note the properties view shows the details for the selection 4. Use shift-select to select multiple packages 5. Note the properties view shows no details for a multi-selection 6. Single click on one of the selected packages 7. Note the properties view still shows no details Clicking off the package and back on reveals details.
This behavior does not happen on Linux.
The (In reply to comment #0) > As a workaround, we overrode StructuredViewer.handleSelect(SelectionEvent > event) with the following: > if (event.stateMask == 0) { > Widget item = event.item; > setSelection(Collections.singletonList(item)); > } > super.handleSelect(event); The above patch is not a satisfactory workaround because it messes up dragging a multi-selection.
. *** This bug has been marked as a duplicate of bug 355200 ***