Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357805

Summary: CheckBoxTableViewer: if multiple rows are selected, Space toggles only one item
Product: [Eclipse Project] Platform Reporter: Thomas Singer <eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
sample to reproduce the bug none

Description Thomas Singer CLA 2011-09-15 10:02:24 EDT
Build Identifier: 3.7.0.v3735b

Run the attached sample code and select both rows. Now press Space. Instead of all rows to be checked, only one is checked.

Reproducible: Always
Comment 1 Thomas Singer CLA 2011-09-15 10:02:44 EDT
Created attachment 203410 [details]
sample to reproduce the bug
Comment 2 Felipe Heidrich CLA 2011-09-19 14:57:00 EDT
I think this behaviour is by design, test on gtk and mac. It all the same.
The idea is that backspace only acts on the focus item (on windows, that is the item with the dot rectangle around, you can move it holding the alt key + arrow up and down, without changing the selection).
sorry that this is not the behaviour you expect but if I change it I break people who relie on this.
Comment 3 Thomas Singer CLA 2011-09-20 11:59:10 EDT
(In reply to comment #2)
> The idea is that backspace only acts on the focus item

Backspace or space?

How to otherwise select/unselect all items easily? Could I override somehow the current behavior in platform-specific way?
Comment 4 Felipe Heidrich CLA 2011-09-21 11:51:27 EDT
space, sorry.

I think I can overwrite it.
hook a keyDown listener, listen for space and call setSelection() on each item in the selection. do forget to stop the default handler from running by setting event.doit to false.