Reputation: 15
When you set up an eclipse plugin preference page, is it possible to add some sort of text or a separator line between the FieldEditors?
@Override
protected void createFieldEditors() {
addField( new SomeFieldEditor(....));
addField( new SomeFieldEditor(....));
}
Upvotes: 0
Views: 604
Reputation: 111142
You can use something like:
Label label = new Label(getFieldEditorParent(), SWT.NONE);
label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 3, 1));
to add a blank like, or
Label label = new Label(getFieldEditorParent(), SWT.SEPARATOR | SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
to add a horizontal separator.
This assumes you are using the GRID
layout. You might have to adjust the '3' in the GridData
depending on how many columns the field editor end up using.
Upvotes: 2