DESCRIPTION

Add a sort order to the unstaged changes

Add a button to sort the unstaged changes in alphabetically order or in
a grouping order(sort order: Untracked, Missing, Modified), which is
also alphabetically sorted. Also the case-sensitive sorting issue is
fixed.

Bug: 473919
Change-Id: Ic59dd8f8d5f621dacfd06063d11a954d311a3e95
Signed-off-by: Jayden Ramos xxx@xxx.xxx

COMMENTS

author: Jayden Ramos
date: 2015-09-05 22:41:17.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2015-09-05 22:41:23.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2015-09-05 23:03:56.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Douglas Trujillo
date: 2015-09-06 10:00:29.000000000

Patch Set 5: Code-Review-1

(2 comments)

Line:3032, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> odd setter name, I'd use "alphabeticSort" consistently:

 private boolean alphabeticSort;

 private void setAlphabeticSort(boolean alphabeticSort) { ...

 private boolean isAlphabeticSort() { ...

Line:3080, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> This is brittle, if we later allow to configure the decoration character this code will break.

The entries shown in the staging view represent files so I'd compare the file names/paths of StagingEntry-s instead of the label texts which contain decoration which is irrelevant for sorting.

In many other similar cases we use CommonUtils.STRING_ASCENDING_COMPARATOR which sorts case-insensitive and sorts strings containing numbers in natural order.

This looks similar to sorting of repositories in the repositories view https://git.eclipse.org/r/#/c/55047/3/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/RepositoryTreeNode.java

-------------------------------------
author: Douglas Trujillo
date: 2015-09-06 10:04:38.000000000

Patch Set 5:

(1 comment)

Line:3006, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> style nit: remove second blank line

-------------------------------------
author: Douglas Trujillo
date: 2015-09-06 21:55:42.000000000

Patch Set 5:

(1 comment)

Line:3080, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> I tried, and found the decoration character is already configurable under "Preferences > Team > Git > Label Decorations > Text Decorations > Files" since StagingViewLabelProvider.getText() is using GitLightweightDecorator.DecorationHelper.decorate()

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-16 23:58:28.000000000

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

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