1 package net.sourceforge.phpdt.tidy.preferences;
3 import net.sourceforge.phpdt.tidy.JtidyPlugin;
4 import org.eclipse.jface.preference.BooleanFieldEditor;
5 import org.eclipse.jface.preference.FieldEditorPreferencePage;
6 import org.eclipse.jface.preference.IPreferenceStore;
7 import org.eclipse.ui.IWorkbench;
8 import org.eclipse.ui.IWorkbenchPreferencePage;
11 * A preference page for a simple HTML editor.
13 public class JTidyPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
15 public JTidyPreferences() {
16 super(FieldEditorPreferencePage.GRID);
18 // Set the preference store for the preference page.
19 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
20 setPreferenceStore(store);
24 * @see org.eclipse.jface.preference.
25 * FieldEditorPreferencePage#createFieldEditors()
27 protected void createFieldEditors() {
29 BooleanFieldEditor showWarning =
30 new BooleanFieldEditor(IPreferenceConstants.GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent());
31 addField(showWarning);
33 BooleanFieldEditor beQuiet =
34 new BooleanFieldEditor(IPreferenceConstants.GENERAL_QUIET, "Show no Errors", getFieldEditorParent());
37 BooleanFieldEditor tidyMark =
38 new BooleanFieldEditor(
39 IPreferenceConstants.GENERAL_TIDY_MARK,
40 "Set Tidy Mark in Header",
41 getFieldEditorParent());
47 * @see IWorkbenchPreferencePage#init
49 public void init(IWorkbench workbench) {