projectName = projectNameField.getText();
validateSettings();
}
});
sourceButton = new StringButtonDialogField(new IStringButtonAdapter() {
@Override
public void changeControlPressed(DialogField field) {
try {
DirectoryDialog dialog = new DirectoryDialog(getShell());
String result = dialog.open();
if (result != null) {
sourceButton.setText(result);
sourcePath = new Path(result);
enableButtons();
scanSourceFolder();
}
} catch (Exception e) {
Logger.logException(e);
}
}
});
sourceButton.setButtonLabel("Browse");
sourceButton.setLabelText("Source folder");
sourceButton.doFillIntoGrid(container, 3);
sourceButton.getTextControl(null).setEnabled(false);
containerButton = new StringButtonDialogField(new IStringButtonAdapter() {
@Override
public void changeControlPressed(DialogField field) {
try {
FileDialog dialog = new FileDialog(getShell());
//dialog.setFilterExtensions(new String[]{"xml"});
String result = dialog.open();
String relativePath = getRelativePath(result);
if (result != null && relativePath != null) {
containerButton.setText(relativePath);
containerPath= new Path(relativePath);
validateSettings();
}
} catch (Exception e) {
Logger.logException(e);
}
}
});
LayoutUtil.setHorizontalGrabbing(sourceButton.getTextControl(null));
containerButton.setButtonLabel("Browse");
containerButton.setLabelText("Dumped container");
containerButton.doFillIntoGrid(container, 3);
consoleButton = new StringButtonDialogField(new IStringButtonAdapter() {
@Override
public void changeControlPressed(DialogField field) {
FileDialog dialog = new FileDialog(getShell());
String result = dialog.open();
String relativePath = getRelativePath(result);