| Summary: | [Viewer] Viewer selection not highlighted when set programmatically and CellEditors are active | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ralf Sternberg <rsternberg> |
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.2 | ||
| Target Milestone: | 1.2 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Ralf Sternberg
Fixed in CVS HEAD. The original JFace code uses the SWT event EraseItem to colorize cells on selection (FocusCellOwnerDrawHighlighter). This event is missing in RWT, so we tried to keep track of selection changes using some other RWT listeners. The problem is that we don't get notified for programmatic selection changes. MULTI selection makes it even worse. The solution is to use a JFace SelectionChanged listener instead. Note that this fix caused a regression, reported in bug 262155, which could be fixed by further improvements in FocusCellOwnerDrawHighlighter. After some more investigation, we found that in original SWT/JFace, the selection of TableViewers is *not* visualized when CellEditors are enabled. Only the focused cell is highlighted by the FocusCellHighlighter. Since for SINGLE selection mode, the focused cell is always part of the selected item, this difference is not obvious. But with MULTI selection, multiple items can be selected while only a single cell is actually highlighted. It seems that JFace CellEditors have not been designed to work with MULTI. This finding renders this bug and also my fix for it invalid, since the expected behavior is not implemented in SWT as well. |