Relocate FieldEditor

32 Views Asked by At

I'm creating a preference page for my eclipse plugin. For this purpose I make use of the FieldEditor to give the user the chance to edit properties (I have subclassed the needed FieldEditors).
However I want to be able to relocate the created FieldEditors meaning that I want to put them on a different container after they have been created.

As a FieldEditor is no GUI-class I can't take it and set it to a different parent (at least I haven't found any functionality like that).

The next idea I had was to get all the GUI-elements of the respective editor (label, etc.) but that seems quite hard as well.

What's the proper wy of relocating such an FieldEditor and if there is no such functionality is there a way of getting all GUI-elements to replace them manually?

Edit
I'm not using a FieldEditorPreferencePage. I'm using my own PreferencePage and use the FieldEditors on top of that.

1

There are 1 best solutions below

3
On BEST ANSWER

If you want a more complex layout than the simple list provided by FieldEditorPreferencePage you need to just extend PreferencePage and create normal SWT controls in the page rather than using field editors.

Use the getPreferenceStore() call to get the IPreferenceStore to load and save the individual preference values.