intial version
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.jtidy / src / net / sourceforge / phpdt / tidy / preferences / JTidyPreferences.java
1 package net.sourceforge.phpdt.tidy.preferences;
2
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;
9
10 /**
11  * A preference page for a simple HTML editor.
12  */
13 public class JTidyPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
14
15         public JTidyPreferences() {
16                 super(FieldEditorPreferencePage.GRID);
17
18                 // Set the preference store for the preference page.
19                 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
20                 setPreferenceStore(store);
21         }
22
23         /**
24          * @see org.eclipse.jface.preference.
25          * FieldEditorPreferencePage#createFieldEditors()
26          */
27         protected void createFieldEditors() {
28
29                 BooleanFieldEditor showWarning =
30                         new BooleanFieldEditor(IPreferenceConstants.GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent());
31                 addField(showWarning);
32
33                 BooleanFieldEditor beQuiet =
34                         new BooleanFieldEditor(IPreferenceConstants.GENERAL_QUIET, "Show no Errors", getFieldEditorParent());
35                 addField(beQuiet);
36         
37                 BooleanFieldEditor tidyMark =
38                         new BooleanFieldEditor(
39                                 IPreferenceConstants.GENERAL_TIDY_MARK,
40                                 "Set Tidy Mark in Header",
41                                 getFieldEditorParent());
42                 addField(tidyMark);
43
44         }
45
46         /**
47          * @see IWorkbenchPreferencePage#init
48          */
49         public void init(IWorkbench workbench) {
50         }
51 }