1 package net.sourceforge.phpdt.tidy.preferences;
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.jface.preference.StringFieldEditor;
8 import org.eclipse.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
12 * A preference page for a simple HTML editor.
14 public class JTidyOutputPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
16 public JTidyOutputPreferences() {
17 super(FieldEditorPreferencePage.GRID);
19 // Set the preference store for the preference page.
20 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
21 setPreferenceStore(store);
25 * @see org.eclipse.jface.preference.
26 * FieldEditorPreferencePage#createFieldEditors()
28 protected void createFieldEditors() {
30 // public static final String OUTPUT_MAKE_CLEAR = "__out_make_clear";
32 BooleanFieldEditor makeClear =
33 new BooleanFieldEditor(IPreferenceConstants.OUTPUT_MAKE_CLEAR, "Clear up", getFieldEditorParent());
35 // public static final String OUTPUT_STRIP_WORD = "__out_strip_Word";
36 BooleanFieldEditor stripWord =
37 new BooleanFieldEditor(
38 IPreferenceConstants.OUTPUT_STRIP_WORD,
39 "Strip Word 2000 thingies",
40 getFieldEditorParent());
42 // public static final String OUTPUT_ENCLOSE_BODY_TEXT = "__out_encloseBodyTexr";
43 BooleanFieldEditor encloseText =
44 new BooleanFieldEditor(
45 IPreferenceConstants.OUTPUT_ENCLOSE_BODY_TEXT,
47 getFieldEditorParent());
48 addField(encloseText);
49 // public static final String OUTPUT_ENCLOSE_BLOCK_TEXT = "__out_encloseBlock";
50 BooleanFieldEditor encloseBlock =
51 new BooleanFieldEditor(
52 IPreferenceConstants.OUTPUT_ENCLOSE_BLOCK_TEXT,
54 getFieldEditorParent());
55 addField(encloseBlock);
57 // public static final String OUTPUT_DEFAULT_ALT_TEXT = "__out_alt_text";
58 StringFieldEditor defaultAlt =
59 new StringFieldEditor(
60 IPreferenceConstants.OUTPUT_DEFAULT_ALT_TEXT,
62 getFieldEditorParent());
67 * @see IWorkbenchPreferencePage#init
69 public void init(IWorkbench workbench) {