final Text result = createLabelText(container, text, listener);
Button button = new Button(container, SWT.PUSH);
button.setText("Browse...");
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(container.getShell(),
ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container");
dialog.showClosedProjects(false);
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] res = dialog.getResult();
if (res.length == 1) {
result.setText(((Path) res[0]).toString());
}
}
}