sortColumn.getParent().setSortDirection(reverse ? SWT.DOWN : SWT.UP);
}
public int compare(Viewer viewer, Object e1, Object e2) {
CounterEntity counters = settings.getCounters();
ICounter c1 = CoverageTools.getCoverageInfo(e1).getCounter(counters);
ICounter c2 = CoverageTools.getCoverageInfo(e2).getCounter(counters);
int res = 0;
switch (settings.getSortColumn()) {
case CoverageView.COLUMN_ELEMENT:
res = elementsorter.compare(viewer, e1, e2);
break;
case CoverageView.COLUMN_RATIO:
res = Double.compare(c1.getCoveredRatio(), c2.getCoveredRatio());
break;
case CoverageView.COLUMN_COVERED:
res = (int) (c1.getCoveredCount() - c2.getCoveredCount());
break;
case CoverageView.COLUMN_MISSED:
res = (int) (c1.getMissedCount() - c2.getMissedCount());
break;
case CoverageView.COLUMN_TOTAL:
res = (int) (c1.getTotalCount() - c2.getTotalCount());
break;
}
if (res == 0) {
res = elementsorter.compare(viewer, e1, e2);
} else {