Bug 310023 - [Viewers] Cannot use focus cell rendering on ViewerColumns in SWT-MULTI mode
Summary: [Viewers] Cannot use focus cell rendering on ViewerColumns in SWT-MULTI mode
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-21 16:12 EDT by Peer Törngren CLA
Modified: 2019-09-06 15:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peer Törngren CLA 2010-04-21 16:12:35 EDT
Build Identifier: M20100211-1343

When using org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter to render individual cells on TableViewers or TreeViewer in "multi-select mode", the viewer does not show all selected lines. 

The effect is that the FocusCellHighlighter is essentially useless in all ColumnViewers that run in multi-select mode.

Reproducible: Always

Steps to Reproduce:
1. Open either org.eclipse.jface.snippets.viewers.Snippet026TreeViewerTabEditing or org.eclipse.jface.snippets.viewers.Snippet058CellNavigationIn34
2. Modify the TreeViewer or TableViewer ti run in SWT.MULTI mode
3. Select multiple rows by standard gestures (mouse or keyboard with Shift or Ctrl modifiers)
4. Only one row is highlighted
5. By further modification, it is easy to verofy that multiple rows are actually selected - the problem is not the selection, but the rendering.
Comment 1 Peer Törngren CLA 2010-04-22 03:26:58 EDT
As discussed with Tom Schindl and Boris Bokowski over e-mail, this is not necessarily a bug, but perhaps a lack of understanding. Still, the referenced snippet serves to illustrate the problem, and there is at least a need to illustrate how to use cell highlighting in multi-selection tables. I've experimented with several approaches, but failed to find a working combination. Some mechanisms seem incompatible with others, e.g. the "old" TableCursor (org.eclipse.swt.custom.TableCursor) works more or less the way I want, but seems incompatible with JFace concepts? It seems to assume a different editor approach than the "newer" TableViewers - it navigates and highlights cells beautifully, but I cannot seem to launch my he cell editors (which are all written for TableViewerColumns with EditingSupport). To use the "classic" (?) TableCursor, I would have to revise my entire cell editor strategy.  

So, more or less all approaches I have tried does navigation just fine, but I get different problems rendering cells. For instance, when using the org.eclipse.jface.snippets.viewers.FocusBorderCellHighlighter (see related bug), the label of the focus cell is overwritten with a blank rectangle, and when using the org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter, I lose the row selector indicator in multi-select mode.

Ignoring the implementation details (wouldn't that be nice? ;-), I would be happy if I could use my standard TableViewers with TableViewerColumns and EditingSupport, and simply add the org.eclipse.swt.custom.TableCursor and have it launch my cell editors when a cell is selected (i.e. launch the registered editor instead of a "just-in-time manufactured" editor as illustrated in the javadoc of the class). Perhaps the TableCursor could be updated to launch the columnviewer's registered cell editors? As I understand the code now, you cannot do this easily since most of the necessary classes and methods are internal in one way or another (private, package private or not exported in the manifest).
Comment 2 Eclipse Webmaster CLA 2019-09-06 15:35:29 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.

If you have further information on the current state of the bug, please add it. 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.