misc changes
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.jtidy / src / net / sourceforge / phpdt / tidy / preferences / JTidyGeneralPreferences.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.FileFieldEditor;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
10
11 /**
12  * A preference page for a simple HTML editor.
13  */
14 public class JTidyGeneralPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceConstants {
15
16   public JTidyGeneralPreferences() {
17     super(FieldEditorPreferencePage.GRID);
18
19     // Set the preference store for the preference page.
20     IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
21     setPreferenceStore(store);
22   }
23
24   /**
25    * @see org.eclipse.jface.preference.
26    * FieldEditorPreferencePage#createFieldEditors()
27    */
28   protected void createFieldEditors() {
29     FileFieldEditor tidyConf = new FileFieldEditor(GENERAL_CONFIG_FILE, "Config file", true, getFieldEditorParent());
30     addField(tidyConf);
31     BooleanFieldEditor useConfigFile =
32       new BooleanFieldEditor(GENERAL_USE_CONFIG_FILE, "Use configurtion file", getFieldEditorParent());
33     addField(useConfigFile);
34     // 
35     
36     BooleanFieldEditor tidyMark =
37       new BooleanFieldEditor(GENERAL_TIDY_MARK, "Set Tidy signature in header", getFieldEditorParent());
38     addField(tidyMark);
39     
40     BooleanFieldEditor showWarning =
41       new BooleanFieldEditor(GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent());
42     addField(showWarning);
43
44     BooleanFieldEditor quiet =
45       new BooleanFieldEditor(GENERAL_QUIET, "Quiet output", getFieldEditorParent());
46     addField(quiet);
47
48     BooleanFieldEditor emacs =
49       new BooleanFieldEditor(GENERAL_EMACS, "Emacs error reporting style", getFieldEditorParent());
50     addField(emacs);
51     
52     BooleanFieldEditor keepFileTimes =
53       new BooleanFieldEditor(GENERAL_KEEP_FILE_TIMES, "Keep last modified time", getFieldEditorParent());
54     addField(keepFileTimes);
55   }
56
57   /**
58    * @see IWorkbenchPreferencePage#init
59    */
60   public void init(IWorkbench workbench) {
61   }
62 }