DESCRIPTION

Bug 236006 - [Viewers] Add tooltip support for DelegatingStyledCellLabelProvider

Delegate to the styled label provider in case it implements
CellLabelProvider, otherwise use the super implementation as before.

Change-Id: Ibe8e965959c92414fcd4d2c7c7eee87facf3bc18
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-11-02 15:43:01.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/160/

-------------------------------------
author: Brenden Conley
date: 2013-11-02 15:57:15.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/160/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2013-11-04 12:11:45.000000000

Patch Set 1: Code-Review-1

I would expect that the tool tip support comes from an IToolTipProvider, like font and color. The proposed fix mixes interfaces and classes and forces clients to inherit a concrete implementation (CellLabelProvider).

-------------------------------------
author: Danika Greer
date: 2013-11-04 13:00:51.000000000

Patch Set 1:

I could not find an IToolTipProvider interface, does it not exist yet? Do you want me to introduce such an interface for this change?

-------------------------------------
author: Sebastian Porter
date: 2013-11-04 14:50:26.000000000

Patch Set 1:

> I could not find an IToolTipProvider interface, does it not 
> exist yet? Do you want me to introduce such an interface 
> for this change?

I would only add it, if we have clients that actually really (want to) use it.

-------------------------------------
author: Danika Greer
date: 2013-11-05 14:10:17.000000000

Patch Set 1:

So, what do you want, interface or not? You voted -1, so please give a concrete suggestion. The options are:

a) We don't add an interface. The code is merged like this because the tooltip-related methods are defined in the abstract class CellLabelProvider.

b) I add an IToolTipProvider with the tooltip-related methods from CellLabelProvider, make it implement that and change the code in DelegatingStyledCellLabelProvider to check against that interface.

Or do you want another option? It's not clear from your comment.

I like b) because it nicely matches IColorProvider and IFontProvider.

-------------------------------------
author: Sebastian Porter
date: 2013-11-05 14:13:48.000000000

Patch Set 1:

> Or do you want another option? It's not clear from your comment.

Sorry ;-)

What I wanted to say: the -1 is for a). b) would be the way to go if we actually have a client that wants to use/adopt this.

-------------------------------------
author: Danika Greer
date: 2013-11-05 14:26:11.000000000

Patch Set 1:

> What I wanted to say: the -1 is for a). b) would be the way to go if we actually have a client that wants to use/adopt this.

The first client would be DelegatingStyledCellLabelProvider, which would already be useful for users. For example, it would remove one reason for extending DelegatingStyledCellLabelProvider here:

https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewStyledCellLabelProvider.java?id=de99760ec81c6cc08550dc925fd6838e97e38db4

-------------------------------------
author: Sebastian Porter
date: 2013-11-06 08:50:17.000000000

Patch Set 1:

OK. CellLabelProvider should then also implement the new interface.

-------------------------------------
