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

Bug 280404

Summary: [TableViewer] Implement cell tooltips in TableViewer.
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: JFaceAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, elias
Version: 1.2   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
TableViewer cell tooltips implementation.
none
Controls Demo - TableViewer Tab with cell tooltips. none

Description Ivan Furnadjiev CLA 2009-06-16 03:53:47 EDT
If a CellLabelProvider/ColumnLabelProvider is defined for the table viewer/column the CellLabelProvider#getToolTipText() have to be used for table cell tooltip.
Comment 1 Ivan Furnadjiev CLA 2009-06-16 03:56:57 EDT
Created attachment 139258 [details]
TableViewer cell tooltips implementation.

To enable the tooltips:
1. Use viewer.getTable().setData( Table.ENABLE_CELL_TOOLTIP, Boolean.TRUE ); when viewer is created. If this is not set on the table, the cell tooltips are disabled.
2. Use TableViewer#setLabelProvider() or TableViewerColumn#setLabelProvider() with CellLabelProvider.
3. The cell tooltip text is taken from CellLabelProvider#getToolTipText()
Comment 2 Ivan Furnadjiev CLA 2009-06-16 03:58:19 EDT
Created attachment 139259 [details]
Controls Demo - TableViewer Tab with cell tooltips.
Comment 3 Ivan Furnadjiev CLA 2009-07-01 05:32:07 EDT
Committed in CVS HEAD.
Comment 4 Benjamin Muskalla CLA 2009-07-01 06:32:54 EDT
Small thing I noticed: TableLCA#writeCellToolTipText does not escape the tooltip text (WidgetLCAUtil#escapeText). Furthermore we should use the WidgetLCAUtil#replaceNewLines for replacing the new lines.
Comment 5 Ivan Furnadjiev CLA 2009-07-01 06:54:26 EDT
Thanks Benny, for noticing this. It is fixed in CVS.