fTableViewer.setContentProvider(new TemplateContentProvider());
fTableViewer.setComparator(new ViewerComparator() {
public int compare(Viewer viewer, Object object1, Object object2) {
if ((object1 instanceof TemplatePersistenceData) && (object2 instanceof TemplatePersistenceData)) {
Template left= ((TemplatePersistenceData) object1).getTemplate();
Template right= ((TemplatePersistenceData) object2).getTemplate();
int result= Collator.getInstance().compare(left.getName(), right.getName());
if (result != 0)
return result;
return Collator.getInstance().compare(left.getDescription(), right.getDescription());
}
return super.compare(viewer, object1, object2);
}
public boolean isSorterProperty(Object element, String property) {