*/
private class BrowseListener extends SelectionAdapter
{
public void widgetSelected(SelectionEvent e)
{
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(), getProject(), false, "Select a working folder");
dialog.setValidator(new ISelectionValidator()
{
public String isValid(Object selection)
{
if (selection.toString().indexOf(getProjectPath()) == 0)
return null;
else
return "Cannot select a folder in other projects";
}
});
if (dialog.open() == ContainerSelectionDialog.OK)
{
Object[] result = dialog.getResult();
if (result.length == 1)
{
String path = ((Path)result[0]).toString();
path = path.substring(getProjectPath().length() + 1);
m_WorkFolder.setText(path);