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.jface.preference.StringFieldEditor;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
13 * A preference page for a simple HTML editor.
15 public class JTidyOutputPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
17 public JTidyOutputPreferences() {
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() {
31 // public static final String OUTPUT_MAKE_CLEAR = "__out_make_clear";
33 BooleanFieldEditor makeClear =
34 new BooleanFieldEditor(IPreferenceConstants.OUTPUT_MAKE_CLEAR, "Clear up", getFieldEditorParent());
36 // public static final String OUTPUT_STRIP_WORD = "__out_strip_Word";
37 BooleanFieldEditor stripWord =
38 new BooleanFieldEditor(
39 IPreferenceConstants.OUTPUT_STRIP_WORD,
40 "Strip Word 2000 thingies",
41 getFieldEditorParent());
43 // public static final String OUTPUT_ENCLOSE_BODY_TEXT = "__out_encloseBodyTexr";
44 BooleanFieldEditor encloseText =
45 new BooleanFieldEditor(
46 IPreferenceConstants.OUTPUT_ENCLOSE_BODY_TEXT,
48 getFieldEditorParent());
49 addField(encloseText);
50 // public static final String OUTPUT_ENCLOSE_BLOCK_TEXT = "__out_encloseBlock";
51 BooleanFieldEditor encloseBlock =
52 new BooleanFieldEditor(
53 IPreferenceConstants.OUTPUT_ENCLOSE_BLOCK_TEXT,
55 getFieldEditorParent());
56 addField(encloseBlock);
58 // public static final String OUTPUT_DEFAULT_ALT_TEXT = "__out_alt_text";
59 StringFieldEditor defaultAlt =
60 new StringFieldEditor(
61 IPreferenceConstants.OUTPUT_DEFAULT_ALT_TEXT,
63 getFieldEditorParent());
68 * @see IWorkbenchPreferencePage#init
70 public void init(IWorkbench workbench) {