void addColumn(final TreeViewerColumn viewerColumn, final int columnidx) {
final TreeColumn column = viewerColumn.getColumn();
if (settings.getSortColumn() == columnidx) {
setSortColumnAndDirection(column, settings.isReverseSort());
}
column.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
settings.toggleSortColumn(columnidx);
setSortColumnAndDirection(column, settings.isReverseSort());
view.refreshViewer();
}