Bug 167858

Summary: [Viewers] Make ColumnViewer#getViewerColumn and ViewerColumn#getLabelProvider public again
Product: [Eclipse Project] Platform Reporter: Benno Baumgartner <benno.baumgartner>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, rmcamara, Tod_Creasey, tom.schindl
Version: 3.3Keywords: api, contributed
Target Milestone: 3.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Bring the new API to ColumnViewer none

Description Benno Baumgartner CLA 2006-12-13 10:18:48 EST
I20061212-0010

In 3.3M4 you've changed the visibility of the two methods from public to default. Please make it public again or provide some other way to access the label provider of a given cell. 
Usecase is the same as yours in ToolTipSupport#shouldCreateToolTip line 59 and 66. I've written my own ToolTip (showing a Browser) and want to set the browsers content with the tool tip text provided by the CellLableProvider.

Thanks
Comment 1 Thomas Schindl CLA 2006-12-13 10:51:00 EST
1. Couldn't you remember yourself the CellLabelProviders you've been setting
   or do you use the old API for setting LabelProviders?
2. Would it help if we would provide:
   CellLabelProvider#createToolTipArea(Event,Composite) which we would consult
   in ToolTipSupport#createToolTipContentArea() to provide completely customized 
   ToolTips? But this also implies that you use the new API.

The second one would be the cleanest solution from my point of view because it takes track of column reordering, disposing, ... . Beside that I don't have any problem to bring back ViewerColumn#getLabelProvider(). 

With ColumnViewer#getViewerColumn() i have the issue that its return type varies between Viewers with no column and those with at least one column.
Comment 2 Martin Aeschlimann CLA 2006-12-13 11:45:45 EST
(In reply to comment #1)
> 1. Couldn't you remember yourself the CellLabelProviders you've been setting
>    or do you use the old API for setting LabelProviders?

Yes, I could remember the label providers, but it wouldn't be my first choice to do so.

> 2. Would it help if we would provide:
>    CellLabelProvider#createToolTipArea(Event,Composite) which we would consult
>    in ToolTipSupport#createToolTipContentArea() to provide completely
> customized 
>    ToolTips? But this also implies that you use the new API.

No, I want to implement the browser tooltip and clients can provide CellLabelProviders which provide tool tip text (as html). I don't want to allow clients to implement there own tool tip control. Besides this I think a label provider should be as simple as possible.

> The second one would be the cleanest solution from my point of view because it
> takes track of column reordering, disposing, ... . Beside that I don't have any
> problem to bring back ViewerColumn#getLabelProvider(). 
> With ColumnViewer#getViewerColumn() i have the issue that its return type
> varies between Viewers with no column and those with at least one column.

What about ColumnViewer#getLabelProvider(int column) then?
Comment 3 Benno Baumgartner CLA 2006-12-13 11:51:30 EST
Sorry, I was logged in as Martin... Vista Testing... Just to clarify: I've made comment #2
Comment 4 Boris Bokowski CLA 2006-12-13 12:06:43 EST
(In reply to comment #2)
> What about ColumnViewer#getLabelProvider(int column) then?

This may work.
Comment 5 Thomas Schindl CLA 2006-12-13 12:19:56 EST
Yes I'm fine with that too.
Comment 6 Thomas Schindl CLA 2006-12-13 12:34:59 EST
Created attachment 55597 [details]
Bring the new API to ColumnViewer
Comment 7 Boris Bokowski CLA 2007-02-04 23:55:22 EST
Released >20070204.
Comment 8 Benno Baumgartner CLA 2007-02-05 03:34:47 EST
Thanks a lot!