summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2013-08-01 05:57:10 (EDT)
committerLars Vogel2013-08-01 05:57:10 (EDT)
commit0dd653351d25e3973ca07112d8a36cf1a0439f47 (patch)
tree1eff0e6641ad946bce583ad3fbfbc889c3bbb044
parent0c954a833ad91a188c6f1899aaf5fe838d5ef7bb (diff)
downloadeclipse.pde.ui-0dd653351d25e3973ca07112d8a36cf1a0439f47.zip
eclipse.pde.ui-0dd653351d25e3973ca07112d8a36cf1a0439f47.tar.gz
eclipse.pde.ui-0dd653351d25e3973ca07112d8a36cf1a0439f47.tar.bz2
Bug 414172 - compile failure in N20130731-2000refs/changes/37/15037/1
Change-Id: I9e2ed2a239c8f3c1735f832ea1b194df74e37d42 Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/ListUtil.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/ListUtil.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/ListUtil.java
index 481e76c..6961b83 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/ListUtil.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/ListUtil.java
@@ -11,7 +11,8 @@
package org.eclipse.pde.internal.ui.wizards;
import java.util.Comparator;
-import org.eclipse.jface.util.*;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
import org.eclipse.pde.core.plugin.*;
import org.eclipse.pde.internal.core.ifeature.IFeature;
@@ -24,14 +25,10 @@ import org.eclipse.swt.graphics.Image;
public class ListUtil {
- private static final Comparator<?> stringComparator = new Comparator<Object>() {
+ private static final Comparator<String> stringComparator = new Comparator<String>() {
- @SuppressWarnings("unchecked")
- public int compare(Object arg0, Object arg1) {
- if (arg0 instanceof String && arg1 instanceof String)
- return ((String) arg0).compareToIgnoreCase((String) arg1);
- // if not two Strings like we expect, then use default comparator
- return Policy.getComparator().compare(arg0, arg1);
+ public int compare(String arg0, String arg1) {
+ return arg0.compareToIgnoreCase(arg1);
}
};
@@ -48,6 +45,7 @@ public class ListUtil {
}
static class FeatureComparator extends NameComparator {
+ @Override
public int compare(Viewer viewer, Object e1, Object e2) {
if (e1 instanceof IFeatureModel && e2 instanceof IFeatureModel) {
IFeature feature1 = ((IFeatureModel) e1).getFeature();
@@ -79,6 +77,7 @@ public class ListUtil {
private static boolean cachedIsFullNameModelEnabled = PDEPlugin.isFullNameModeEnabled();
+ @Override
@SuppressWarnings("unchecked")
public int compare(Viewer viewer, Object e1, Object e2) {
int result = 0;