- Text text = new Text(parent, SWT.SINGLE | SWT.LEAD | SWT.BORDER
- | (multiline ? SWT.MULTI : SWT.NONE));
- text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Text text;
+ if (multiline) {
+ text = new Text(parent, SWT.LEAD | SWT.BORDER | SWT.MULTI);
+ text.setLayoutData(EclipseUiUtils.fillAll());
+ } else {
+ text = new Text(parent, SWT.LEAD | SWT.BORDER | SWT.SINGLE);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+ }