DESCRIPTION

Bug 364735 - [Viewers] ViewerComparator violates its general contract

Don't use DecoratingLabelProvider for sorting, see bug 364735 comment
60. The results from this label provider are unstable by design and may
change during the sort operation. Instead, use the original label
provider enclosed by the DecoratingLabelProvider.

Change-Id: I67dd03e62b8d32913aacc5670c4b864264d8bc1e
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Jayvion Booth
date: 2016-09-02 19:14:29.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2016-09-02 19:32:06.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2016-09-02 20:00:31.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Teagan Marsh
date: 2016-09-03 03:50:25.000000000

Patch Set 2:

Interesting!  Logically this makes sense: the ViewerComparator should be using a stable sort, and decorations may change that.

I'm a bit puzzled many viewers seem to ignore leading decorations somehow (e.g., like the leading ">" from team providers); I haven't been able to dig into this yet.

-------------------------------------
author: Teagan Marsh
date: 2016-09-07 02:27:01.000000000

Patch Set 2: Code-Review+1

(1 comment)

+1: this change makes sense to me.  It doesn't make sense to use visual cues like Team's ">" modified markers for ordering.  The only improvement I can think of is to allow this change to be disabled with a system property in case there is an application that depends on this decorating behaviour.

Another approach might be to define an IDecorationContext property to only apply semantically-meaningful label decorations, but that would require retrofitting existing decorators.

Line:151, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerComparator.java -> I'd only add here that: decorations are usually visual aids to the user and shouldn't be used in ordering.

-------------------------------------
author: Jayvion Booth
date: 2016-09-07 05:31:43.000000000

Patch Set 2:

(1 comment)

Line:151, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerComparator.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2016-09-07 19:48:40.000000000

Change has been successfully merged into the git repository by Jayvion Booth - on the beach till 12.09

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