Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-06-17 17:16:29 -0400
committerGerrit Code Review @ Eclipse.org2013-06-25 12:55:20 -0400
commitb36528c1c41a7b24936004d0e29c823f1068187c (patch)
tree0c74bfff72437738e072043387b89e80d441fb3e /org.eclipse.mylyn.tasks.ui
parent6a27e8dc89e5548ee1c7cac2ce84518ad529f745 (diff)
downloadorg.eclipse.mylyn.tasks-b36528c1c41a7b24936004d0e29c823f1068187c.tar.gz
org.eclipse.mylyn.tasks-b36528c1c41a7b24936004d0e29c823f1068187c.tar.xz
org.eclipse.mylyn.tasks-b36528c1c41a7b24936004d0e29c823f1068187c.zip
322855: New Query > Select a Repo wizard page should sort repos by name
Change-Id: Ia573ba39558f18c51b7c42e7fbb9d4532736958a Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=322855
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
index 79cfe1fe1..c209515c9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
@@ -30,19 +30,19 @@ public class TaskRepositoriesSorter extends ViewerSorter {
String label1 = t1.getRepositoryLabel();
String label2 = t2.getRepositoryLabel();
+ if (label1 == null) {
+ return (label2 != null) ? 1 : 0;
+ } else if (label2 == null) {
+ return -1;
+ }
+
if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label1)) {
return -1;
} else if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label2)) {
return 1;
}
- if (!t1.getConnectorKind().equals(t2.getConnectorKind())) {
- return (t1.getConnectorKind()).compareTo(t2.getConnectorKind());
- } else {
- if (label1 != null) {
- return label1.compareTo(label2);
- }
- }
+ return label1.compareToIgnoreCase(label2);
}
return super.compare(viewer, e1, e2);
}

Back to the top