1 package net.sourceforge.phpdt.tidy.preferences;
3 import net.sourceforge.phpdt.tidy.JtidyPlugin;
5 import org.eclipse.jface.preference.BooleanFieldEditor;
6 import org.eclipse.jface.preference.FieldEditorPreferencePage;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
12 * A preference page for a simple HTML editor.
14 public class JTidyPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
16 public JTidyPreferences() {
17 super(FieldEditorPreferencePage.GRID);
19 // Set the preference store for the preference page.
20 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
21 setPreferenceStore(store);
25 * @see org.eclipse.jface.preference.
26 * FieldEditorPreferencePage#createFieldEditors()
28 protected void createFieldEditors() {
30 BooleanFieldEditor showWarning =
31 new BooleanFieldEditor(IPreferenceConstants.GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent());
32 addField(showWarning);
34 BooleanFieldEditor beQuiet =
35 new BooleanFieldEditor(IPreferenceConstants.GENERAL_QUIET, "Show no Errors", getFieldEditorParent());
38 BooleanFieldEditor tidyMark =
39 new BooleanFieldEditor(
40 IPreferenceConstants.GENERAL_TIDY_MARK,
41 "Set Tidy Mark in Header",
42 getFieldEditorParent());
48 * @see IWorkbenchPreferencePage#init
50 public void init(IWorkbench workbench) {