X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/preferences/JTidyGeneralPreferences.java b/archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/preferences/JTidyGeneralPreferences.java new file mode 100644 index 0000000..cfb01ec --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/preferences/JTidyGeneralPreferences.java @@ -0,0 +1,62 @@ +package net.sourceforge.phpdt.tidy.preferences; + +import net.sourceforge.phpdt.tidy.JtidyPlugin; +import org.eclipse.jface.preference.BooleanFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.FileFieldEditor; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +/** + * A preference page for a simple HTML editor. + */ +public class JTidyGeneralPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceConstants { + + public JTidyGeneralPreferences() { + super(FieldEditorPreferencePage.GRID); + + // Set the preference store for the preference page. + IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore(); + setPreferenceStore(store); + } + + /** + * @see org.eclipse.jface.preference. + * FieldEditorPreferencePage#createFieldEditors() + */ + protected void createFieldEditors() { + FileFieldEditor tidyConf = new FileFieldEditor(GENERAL_CONFIG_FILE, "Config file", true, getFieldEditorParent()); + addField(tidyConf); + BooleanFieldEditor useConfigFile = + new BooleanFieldEditor(GENERAL_USE_CONFIG_FILE, "Use configurtion file", getFieldEditorParent()); + addField(useConfigFile); + // + + BooleanFieldEditor tidyMark = + new BooleanFieldEditor(GENERAL_TIDY_MARK, "Set Tidy signature in header", getFieldEditorParent()); + addField(tidyMark); + + BooleanFieldEditor showWarning = + new BooleanFieldEditor(GENERAL_SHOW_WARNINGS, "Show warnings", getFieldEditorParent()); + addField(showWarning); + + BooleanFieldEditor quiet = + new BooleanFieldEditor(GENERAL_QUIET, "Quiet output", getFieldEditorParent()); + addField(quiet); + + BooleanFieldEditor emacs = + new BooleanFieldEditor(GENERAL_EMACS, "Emacs error reporting style", getFieldEditorParent()); + addField(emacs); + + BooleanFieldEditor keepFileTimes = + new BooleanFieldEditor(GENERAL_KEEP_FILE_TIMES, "Keep last modified time", getFieldEditorParent()); + addField(keepFileTimes); + } + + /** + * @see IWorkbenchPreferencePage#init + */ + public void init(IWorkbench workbench) { + } +}