Source:
<code>private TreeViewer doCreateTreeViewer(Composite parent) { fCheckboxTreeViewer = new CheckboxTreeViewer(parent, SWT.BORDER); fContentProvider = new TmfNavigatorContentProvider() { @Override public Object[] getElements(Object inputElement) { return getChildren(inputElement); } @Override public synchronized Object[] getChildren(Object parentElement) { if (parentElement instanceof TmfExperimentElement) { return ((TmfExperimentElement) parentElement).getTraces().toArray(); } return null; } @Override public boolean hasChildren(Object element) { if (element instanceof TmfExperimentElement) { return !(((TmfExperimentElement) element).getTraces().isEmpty()); } return false; } }; fCheckboxTreeViewer.setContentProvider(fContentProvider); fLabelProvider = new TmfNavigatorLabelProvider(); fCheckboxTreeViewer.setLabelProvider(fLabelProvider); fCheckboxTreeViewer.setSorter(new ViewerSorter()); final Tree tree = fCheckboxTreeViewer.getTree(); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); tree.setLayoutData(gd); tree.setHeaderVisible(true); final TreeViewerColumn column = new TreeViewerColumn(fCheckboxTreeViewer, SWT.NONE); column.getColumn().setWidth(COLUMN_WIDTH); column.getColumn().setText(Messages.SelectRootNodeWizardPage_TraceColumnHeader); column.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object element) { return fLabelProvider.getText(element); } @Override public Image getImage(Object element) { return fLabelProvider.getImage(element); } }); fCheckboxTreeViewer.setInput(fExperiment); <START> <END> fCheckboxTreeViewer.addCheckStateListener(new ICheckStateListener() { @Override public void checkStateChanged(CheckStateChangedEvent event) { Object element = event.getElement(); for (Object checkedElement : fCheckboxTreeViewer.getCheckedElements()) { fCheckboxTreeViewer.setChecked(checkedElement, false); } fCheckboxTreeViewer.setChecked(element, event.getChecked()); } }); return fCheckboxTreeViewer; }</code><technical_language>Instead of setting a fixed column width, pack column setting input</technical_language>

Target:
private TreeViewer doCreateTreeViewer(Composite parent) { fCheckboxTreeViewer = new CheckboxTreeViewer(parent, SWT.BORDER); fContentProvider = new TmfNavigatorContentProvider() { @Override public Object[] getElements(Object inputElement) { return getChildren(inputElement); } @Override public synchronized Object[] getChildren(Object parentElement) { if (parentElement instanceof TmfExperimentElement) { return ((TmfExperimentElement) parentElement).getTraces().toArray(); } return null; } @Override public boolean hasChildren(Object element) { if (element instanceof TmfExperimentElement) { return !(((TmfExperimentElement) element).getTraces().isEmpty()); } return false; } }; fCheckboxTreeViewer.setContentProvider(fContentProvider); fLabelProvider = new TmfNavigatorLabelProvider(); fCheckboxTreeViewer.setLabelProvider(fLabelProvider); fCheckboxTreeViewer.setSorter(new ViewerSorter()); final Tree tree = fCheckboxTreeViewer.getTree(); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); tree.setLayoutData(gd); tree.setHeaderVisible(true); final TreeViewerColumn column = new TreeViewerColumn(fCheckboxTreeViewer, SWT.NONE); column.getColumn().setText(Messages.SelectRootNodeWizardPage_TraceColumnHeader); column.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object element) { return fLabelProvider.getText(element); } @Override public Image getImage(Object element) { return fLabelProvider.getImage(element); } }); fCheckboxTreeViewer.setInput(fExperiment); column.getColumn().pack(); fCheckboxTreeViewer.addCheckStateListener(new ICheckStateListener() { @Override public void checkStateChanged(CheckStateChangedEvent event) { Object element = event.getElement(); for (Object checkedElement : fCheckboxTreeViewer.getCheckedElements()) { fCheckboxTreeViewer.setChecked(checkedElement, false); } fCheckboxTreeViewer.setChecked(element, event.getChecked()); setPageComplete(event.getChecked()); } }); setPageComplete(true); fCheckboxTreeViewer.getTree().getItem(0).setChecked(true); return fCheckboxTreeViewer; }