Reputation: 6531
How to grey out dependent preferences in Eclipse RCP?
Can preferences be somehow defined as dependent from another preferency, so that they are greyed-out, if the preference which it depends from - is disabled?
Upvotes: 0
Views: 267
Reputation: 1113
As preferences are just an SWT controls you can call
setEnabled(false)
method on them to disable (grey-out) them. In case of FieldEditorPreferencePage you should probably call
***FieldEditor.setEnabled(false, getFieldEditorParent());
Upvotes: 1