Bug 167858 - [Viewers] Make ColumnViewer#getViewerColumn and ViewerColumn#getLabelProvider public again
Summary: [Viewers] Make ColumnViewer#getViewerColumn and ViewerColumn#getLabelProvider...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, contributed
Depends on:
Blocks:
 
Reported: 2006-12-13 10:18 EST by Benno Baumgartner CLA
Modified: 2007-02-05 03:34 EST (History)
4 users (show)

See Also:


Attachments
Bring the new API to ColumnViewer (8.82 KB, patch)
2006-12-13 12:34 EST, Thomas Schindl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!