diff options
author | Tomasz Zarna | 2013-06-17 21:16:29 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2013-06-25 16:55:20 +0000 |
commit | b36528c1c41a7b24936004d0e29c823f1068187c (patch) | |
tree | 0c74bfff72437738e072043387b89e80d441fb3e /org.eclipse.mylyn.tasks.ui | |
parent | 6a27e8dc89e5548ee1c7cac2ce84518ad529f745 (diff) | |
download | org.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.java | 14 |
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); } |