DESCRIPTION

Fix sorting of nodes in repositories view

RepositoriesViewSorter re-implemented sorting of nodes in a naïve way
which is already implemented in RepositoryTreeNode. Instead delegate the
comparison to RepositoryNode.compare().

Also improve RepositoryNode.compare() using CommonUtil comparators which
ensure that sorting is case-insensitive and sort names containing
numbers in natural order. This ensures all objects shown in the
repositories view are sorted accordingly.

This also fixes the problem that since b9dad5fa the order of repository
nodes flipped when its status became dirty/clean. This was caused by
RepositoriesViewSorter which compared the node label texts which changes
when the dirty decorator "> " is added or removed.

Bug: 476671
Change-Id: I29bfc47711ae0bd669786793ac7b40aea7fb8f55
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2015-09-06 09:23:44.000000000

Patch Set 3: Published edit on patch set 2

-------------------------------------
author: Brenden Conley
date: 2015-09-06 09:23:50.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7548/

-------------------------------------
author: Brenden Conley
date: 2015-09-06 09:44:52.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7548/ : SUCCESS

-------------------------------------
author: Rachel Chaney
date: 2015-09-06 11:03:32.000000000

Patch Set 3: Code-Review+1

(1 comment)

Looks good,

I tested the behaviour before and after the commit.

Only the comment between your new lines (not inserted by this commit), can fixed. See gerrit comments.

Line:305, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java -> // if the name is unique, let's look at the whole path

-------------------------------------
author: Douglas Trujillo
date: 2015-09-06 21:48:35.000000000

Patch Set 3:

(1 comment)

Line:305, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java -> no, I think this is correct: if there is more than one entry with the same file name e.g. "x" then compare the complete file path e.g. /a/x and /b/x which is guaranteed to be unique by the file system

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-06 22:29:34.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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