1 11 package org.eclipse.ui.internal.dialogs; 12 13 import org.eclipse.jface.viewers.Viewer; 14 import org.eclipse.jface.viewers.ViewerComparator; 15 import org.eclipse.ui.internal.registry.IActionSetDescriptor; 16 17 20 public class ActionSetComparator extends ViewerComparator { 21 22 25 public ActionSetComparator() { 26 } 27 28 33 public int compare(Viewer viewer, Object e1, Object e2) { 34 if (e1 instanceof IActionSetDescriptor) { 35 String str1 = DialogUtil.removeAccel(((IActionSetDescriptor) e1) 36 .getLabel()); 37 String str2 = DialogUtil.removeAccel(((IActionSetDescriptor) e2) 38 .getLabel()); 39 return getComparator().compare(str1, str2); 40 } 41 return 0; 42 } 43 } 44 | Popular Tags |