minor
authork.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Thu, 13 Aug 2015 12:13:04 +0000 (14:13 +0200)
committerk.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Thu, 13 Aug 2015 12:13:04 +0000 (14:13 +0200)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNodeNavigatorComparator.java

index 2e5da66..5f243ca 100644 (file)
@@ -1,40 +1,33 @@
-package eu.etaxonomy.taxeditor.navigation.navigator;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-
-import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
-
-public class TaxonNodeNavigatorComparator extends ViewerComparator{
-
-       
-       public TaxonNodeNavigatorComparator(Comparator<TaxonBase> comparator){
-               super(comparator);
-       }
-
-       
-       
-       @Override
-       public int compare(Viewer viewer, Object e1, Object e2){
-               if (e1 instanceof Classification && e2 instanceof Classification){
-                       return ((Classification)e1).getTitleCache().compareTo(((Classification)e2).getTitleCache());
-               } else{
-                       if (this.getComparator() instanceof TaxonNaturalComparator){
-                               return this.getComparator().compare((TaxonNode)e1, (TaxonNode)e2);
-                       }else{
-                               return this.getComparator().compare(e1,e2);
-                       }
-               }
-       }
-}
+package eu.etaxonomy.taxeditor.navigation.navigator;\r
+\r
+import java.util.Comparator;\r
+\r
+import org.eclipse.jface.viewers.Viewer;\r
+import org.eclipse.jface.viewers.ViewerComparator;\r
+\r
+import eu.etaxonomy.cdm.model.taxon.Classification;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNaturalComparator;\r
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;\r
+\r
+public class TaxonNodeNavigatorComparator extends ViewerComparator{\r
+\r
+       \r
+       public TaxonNodeNavigatorComparator(Comparator<TaxonNode> comparator){\r
+               super(comparator);\r
+       }\r
+\r
+       \r
+       \r
+       @Override\r
+       public int compare(Viewer viewer, Object e1, Object e2){\r
+               if (e1 instanceof Classification && e2 instanceof Classification){\r
+                       return ((Classification)e1).getTitleCache().compareTo(((Classification)e2).getTitleCache());\r
+               } else{\r
+                       if (this.getComparator() instanceof TaxonNaturalComparator){\r
+                               return this.getComparator().compare((TaxonNode)e1, (TaxonNode)e2);\r
+                       }else{\r
+                               return this.getComparator().compare(e1,e2);\r
+                       }\r
+               }\r
+       }\r
+}\r