layout.marginHeight = 0;
layout.marginWidth = 0;
initializeDialogUnits(result);
FileSearchQuery query = getQuery();
Label label = new Label(result, SWT.NONE);
label.setText(SearchMessages.ReplaceDialog_replace_label);
Text clabel = new Text(result, SWT.BORDER | SWT.READ_ONLY);
clabel.setText(query.getSearchString());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = convertWidthInCharsToPixels(50);
clabel.setLayoutData(gd);
label = new Label(result, SWT.NONE);
label.setText(SearchMessages.ReplaceDialog_with_label);
fTextField = new Combo(result, SWT.DROP_DOWN);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = convertWidthInCharsToPixels(50);
fTextField.setLayoutData(gd);
fTextField.setFocus();
IDialogSettings settings = SearchPlugin.getDefault().getDialogSettings().getSection(SETTINGS_GROUP);
if (settings != null) {
String[] previousReplaceWith = settings.getArray(SETTINGS_REPLACE_WITH);
if (previousReplaceWith != null) {
fTextField.setItems(previousReplaceWith);
fTextField.select(0);
}
}
new Label(result, SWT.NONE);
fReplaceWithRegex = new Button(result, SWT.CHECK);
fReplaceWithRegex.setText(SearchMessages.ReplaceDialog_isRegex_label);
if (query.isRegexSearch()) {
fReplaceWithRegex.setSelection(true);
} else {
fReplaceWithRegex.setSelection(false);
fReplaceWithRegex.setEnabled(false);
}