1 11 package org.eclipse.jdt.ui; 12 13 import org.eclipse.jface.viewers.Viewer; 14 import org.eclipse.jface.viewers.ViewerSorter; 15 16 17 28 public class JavaElementSorter extends ViewerSorter { 29 30 private final JavaElementComparator fComparator; 31 32 35 public JavaElementSorter() { 36 super(null); fComparator= new JavaElementComparator(); 38 } 39 40 48 public boolean isSorterProperty(Object element, Object property) { 49 return true; 50 } 51 52 55 public int category(Object element) { 56 return fComparator.category(element); 57 } 58 59 62 public int compare(Viewer viewer, Object e1, Object e2) { 63 return fComparator.compare(viewer, e1, e2); 64 } 65 66 70 public final java.text.Collator getCollator() { 71 if (collator == null) { 73 collator= java.text.Collator.getInstance(); 74 } 75 return collator; 76 } 77 } 78 | Popular Tags |