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

Bug 351310

Summary: IColumnFormatter refactor proposal
Product: [RT] Riena Reporter: Christian Campo <christian.campo>
Component: Look And FeelAssignee: Project Inbox <riena.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: Stefan.Liebig, steffen.kriese, thorsten.schenkel
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Christian Campo CLA 2011-07-06 07:32:56 EDT
IColumnFormatter was recently extended. It had previously 7 callback methods for formating individual cells in a table. Now 9 additional methods where added for cell-specific tooltip support.

Not so good (code smell)
- why is still called IColumnFormatter, if its more about tooltips
- why do people who only want to format cells need to implement tooltip methods (and not just one, but many) (even though there is the base class ColumnFormatter

There are two ways I believe to do this better:
- Separate the two in the previous IColumnFormatter and have the new tool methods in a derived interface IColumnFormatterwithTooltip...the Table Ridget could figure out at runtime, whether the columnformatter also supports tooltip information based on the typ information from the interface
- have 2 independant interfaces (probably better) one for formatting, one for tooltip. and have 2 separate methods in the Table ridget to set them

I am in favor for the last solution but open this up for discussion.