diff options
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryComparator.java')
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryComparator.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryComparator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryComparator.java deleted file mode 100644 index 9e7b04b29..000000000 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryComparator.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2008 Tasktop Technologies and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Tasktop Technologies - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.internal.tasks.ui; - -import java.util.Comparator; - -import org.eclipse.mylyn.tasks.core.TaskRepository; - -/** - * @author Mik Kersten - */ -public class TaskRepositoryComparator implements Comparator<TaskRepository> { - public int compare(TaskRepository t1, TaskRepository t2) { - if (t1.getRepositoryLabel() != null && t2.getRepositoryLabel() != null) { - return t1.getRepositoryLabel().compareTo(t2.getRepositoryLabel()); - } else if (t1.getRepositoryLabel() == null && t2.getRepositoryLabel() == null) { - return t1.getRepositoryUrl().compareTo(t2.getRepositoryUrl()); - } else if (t1.getRepositoryLabel() == null) { - return -1; - } else if (t2.getRepositoryLabel() == null) { - return 1; - } - return 1; - } -}
\ No newline at end of file |