Source:
protected Control createDialogArea(Composite parent) { Composite searchBarParent = new Composite(parent, SWT.NONE); searchBarParent.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().grab(true, false) .applyTo(searchBarParent); Composite main = new Composite(parent, SWT.NONE); main.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); final ResourceManager resources = new LocalResourceManager( JFaceResources.getResources()); UIUtils.hookDisposal(main, resources); table = new CommitGraphTable(main, null, resources, false); table.getTableView().addSelectionChangedListener( new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { commitId = null; IStructuredSelection sel = (IStructuredSelection) event .getSelection(); if (sel.size() == 1) commitId = ((SWTCommit) sel.getFirstElement()) .getId(); getButton(OK).setEnabled(commitId != null); } }); table.getTableView().addOpenListener(new IOpenListener() { @Override public void open(OpenEvent event) { if (getButton(OK).isEnabled()) buttonPressed(OK); } }); GridDataFactory.fillDefaults().grab(true, true).minSize(SWT.DEFAULT, 400).applyTo(table.getControl()); allCommits = new SWTCommitList(resources); table.getControl().addDisposeListener(e -> allCommits.clear()); searchBar = new SearchBar(GitHistoryPage.class.getName() + ".searchBar", table, null, null); searchBar.fill(searchBarParent); return main; }

Target:
protected Control createDialogArea(Composite parent) { Composite searchBarParent = new Composite(parent, SWT.NONE); searchBarParent.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().grab(true, false) .applyTo(searchBarParent); Composite main = new Composite(parent, SWT.NONE); main.setLayout(new GridLayout(1, false)); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); final ResourceManager resources = new LocalResourceManager( JFaceResources.getResources()); UIUtils.hookDisposal(main, resources); table = new CommitGraphTable(main, null, resources, false); table.getTableView().addSelectionChangedListener( new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { commitId = null; IStructuredSelection sel = (IStructuredSelection) event .getSelection(); if (sel.size() == 1) commitId = ((SWTCommit) sel.getFirstElement()) .getId(); getButton(OK).setEnabled(commitId != null); } }); table.getTableView().addOpenListener(new IOpenListener() { @Override public void open(OpenEvent event) { if (getButton(OK).isEnabled()) buttonPressed(OK); } }); GridDataFactory.fillDefaults().grab(true, true).minSize(SWT.DEFAULT, 400).applyTo(table.getControl()); allCommits = new SWTCommitList(resources); table.getControl().addDisposeListener(e -> allCommits.clear()); searchBar = new SearchBar( CommitSelectionDialog.class.getName() + ".searchBar", table, null) { @Override protected void showStatus(FindToolbar originator, String text) { statusLabel.setText(text); statusLabel.getParent().layout(); } }; searchBar.fill(searchBarParent); Composite statusLine = new Composite(parent, SWT.NONE); statusLine.setLayout(new GridLayout()); GridDataFactory.fillDefaults().grab(true, true).applyTo(statusLine); statusLabel = new Label(statusLine, SWT.NONE); GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER) .grab(false, false) .applyTo(statusLabel); return main; }