Community
Participate
Working Groups
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.
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).
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.