1 11 package org.eclipse.help.ui.internal.search; 12 import org.eclipse.help.internal.search.*; 13 import org.eclipse.jface.viewers.*; 14 17 public class SorterByTitle extends ViewerSorter { 18 21 public int compare(Viewer viewer, Object e1, Object e2) { 22 try { 23 String title1 = ((SearchHit) e1).getLabel(); 24 String title2 = ((SearchHit) e2).getLabel(); 25 return super.getCollator().compare(title1, title2); 26 } catch (Exception e) { 27 } 28 return super.compare(viewer, e1, e2); 29 } 30 } | Popular Tags |