for (int i = 0; i < columnHeaders.length; i++) {
layout.addColumnData(columnLayouts[i]);
TableColumn tc = new TableColumn(getTable(), SWT.BORDER, i);
tc.setResizable(columnLayouts[i].resizable);
tc.setText(columnHeaders[i]);
tc.pack();
final int j = i;
tc.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
ViewerSorter oldSorter = viewer.getSorter();
if (oldSorter instanceof ColumnBasedSorter) {