Source:
protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(main); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); tv = new TableViewer(main, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER); tv.setContentProvider(ArrayContentProvider.getInstance()); tv.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection sel = (IStructuredSelection) event .getSelection(); boolean enabled = false; for (Entry<Repository, Object> entry : (List<Entry<Repository, Object>>) sel .toList()) enabled |= entry.getValue() instanceof PullResult; getButton(DETAIL_BUTTON).setEnabled(enabled); } }); tv.addOpenListener(new IOpenListener() { public void open(OpenEvent event) { buttonPressed(DETAIL_BUTTON); } }); tv.setLabelProvider(new LabelProvider()); Table table = tv.getTable(); int linesToShow = Math.min(Math.max(results.size() + 1, 5), 15); int heightHint = table.getItemHeight() * linesToShow; GridDataFactory.fillDefaults().grab(true, true).hint(800, heightHint) .applyTo(table); TableColumn col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_RepositoryColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_FetchStatusColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_UpdateStatusColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(150); col.setText(UIText.MultiPullResultDialog_OverallStatusColumnHeader); table.setHeaderVisible(true); table.setLinesVisible(true); tv.setInput(results.entrySet()); return main; }

Target:
protected Control createDialogArea(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().applyTo(main); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); tv = new TableViewer(main, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER); tv.setContentProvider(ArrayContentProvider.getInstance()); tv.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection sel = (IStructuredSelection) event .getSelection(); boolean enabled = false; for (Entry<Repository, Object> entry : (List<Entry<Repository, Object>>) sel .toList()) enabled |= entry.getValue() instanceof PullResult; getButton(DETAIL_BUTTON).setEnabled(enabled); } }); tv.addOpenListener(new IOpenListener() { public void open(OpenEvent event) { buttonPressed(DETAIL_BUTTON); } }); tv.setLabelProvider(new LabelProvider()); Table table = tv.getTable(); int linesToShow = Math.min(Math.max(results.size(), 5), 15); int heightHint = table.getItemHeight() * linesToShow; GridDataFactory.fillDefaults().grab(true, true).hint(800, heightHint) .applyTo(table); TableColumn col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_RepositoryColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_FetchStatusColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(200); col.setText(UIText.MultiPullResultDialog_UpdateStatusColumnHeader); col = new TableColumn(table, SWT.NONE); col.setWidth(150); col.setText(UIText.MultiPullResultDialog_OverallStatusColumnHeader); table.setHeaderVisible(true); table.setLinesVisible(true); tv.setInput(results.entrySet()); return main; }