Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java')
-rw-r--r--plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java b/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java
deleted file mode 100644
index a6889d86ed6..00000000000
--- a/plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui/src/org/eclipse/papyrus/infra/discovery/ui/internal/viewer/DiscoveryCategoryComparator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * Obeo - adaptation for Amalgamation, EMF based and no Mylyn dependency
- * CEA LIST - adaptation to Papyrus
- *******************************************************************************/
-package org.eclipse.papyrus.infra.discovery.ui.internal.viewer;
-
-import java.util.Comparator;
-
-import org.eclipse.papyrus.infra.discovery.Category;
-
-
-/**
- * A comparator that orders categories by relevance and name.
- *
- * @author David Green
- */
-public class DiscoveryCategoryComparator implements Comparator<Category> {
-
- public int compare(Category o1, Category o2) {
- if (o1 == o2) {
- return 0;
- }
- Integer r1 = o1.getRelevance();
- Integer r2 = o2.getRelevance();
- int i;
- if (r1 != null && r2 != null) {
- // don't have to worry about format, since they were already
- // validated
- // note that higher relevance appears first, thus the reverse order
- // of
- // the comparison.
- i = new Integer(r2).compareTo(new Integer(r1));
- } else if (r1 == null) {
- return 1;
- } else {
- return -1;
- }
- if (i == 0) {
- i = o1.getName().compareToIgnoreCase(o2.getName());
- if (i == 0) {
- i = o1.getName().compareTo(o2.getName());
- }
- }
- return i;
- }
-
-} \ No newline at end of file

Back to the top