super(name);
controls = new Control[2];
sp = new StringParameter(pluginGroup, name, defaultValue);
controls[0] = sp.getControl();
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
controls[0].setLayoutData(gridData);
Button browse = new Button(pluginGroup, SWT.PUSH);
Image imgOpenFolder = ImageRepository.getImage(getBrowseImageResource());
browse.setImage(imgOpenFolder);
imgOpenFolder.setBackground(browse.getBackground());
browse.setToolTipText(MessageText.getString("ConfigView.button.browse"));
browse.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
String path = DirectoryParameter.this.openDialog(pluginGroup.getShell(), sp.getValue());
if (path != null) {
sp.setValue(path);
}
}
});
controls[1] = browse;