Question

When creating a preference page in RCP, e.g. something like:

public class MyPreferencePage extends org.eclipse.jface.preference.PreferencePage  implements IWorkbenchPreferencePage

how can I remove the "Restore default values" and "Apply" buttons which get added by default. Using

this.getDefaultsButton().setVisible(false);
this.getApplyButton().setVisible(false);

results in an error.

Was it helpful?

Solution

Call PreferencePage.noDefaultAndApplyButton() before your control is created.

OTHER TIPS

use this noDefaultAndApplyButton() before your code begins

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top