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.FileFieldEditor;
8 import org.eclipse.jface.preference.IPreferenceStore;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
13 * A preference page for a simple HTML editor.
15 public class JTidyGeneralPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceConstants {
17 public JTidyGeneralPreferences() {
18 super(FieldEditorPreferencePage.GRID);
20 // Set the preference store for the preference page.
21 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
22 setPreferenceStore(store);
26 * @see org.eclipse.jface.preference.
27 * FieldEditorPreferencePage#createFieldEditors()
29 protected void createFieldEditors() {
30 FileFieldEditor tidyConf = new FileFieldEditor(GENERAL_CONFIG_FILE, "Config file", true, getFieldEditorParent());
32 BooleanFieldEditor useConfigFile =
33 new BooleanFieldEditor(GENERAL_USE_CONFIG_FILE, "Use configurtion file", getFieldEditorParent());
34 addField(useConfigFile);
37 BooleanFieldEditor tidyMark =
38 new BooleanFieldEditor(GENERAL_TIDY_MARK, "Set Tidy signature in header", getFieldEditorParent());
41 BooleanFieldEditor showWarning =
42 new BooleanFieldEditor(GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent());
43 addField(showWarning);
45 BooleanFieldEditor quiet =
46 new BooleanFieldEditor(GENERAL_QUIET, "Quiet output", getFieldEditorParent());
49 BooleanFieldEditor emacs =
50 new BooleanFieldEditor(GENERAL_EMACS, "Emacs error reporting style", getFieldEditorParent());
53 BooleanFieldEditor keepFileTimes =
54 new BooleanFieldEditor(GENERAL_KEEP_FILE_TIMES, "Keep last modified time", getFieldEditorParent());
55 addField(keepFileTimes);
59 * @see IWorkbenchPreferencePage#init
61 public void init(IWorkbench workbench) {