16fe26e826e53c6eda9c753445268ca7e9d81683
[phpeclipse.git] /
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.IPreferenceStore;
7 import org.eclipse.jface.preference.StringFieldEditor;
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 JTidyOutputPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
15
16         public JTidyOutputPreferences() {
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
30                 //               public static final String OUTPUT_MAKE_CLEAR   = "__out_make_clear";
31
32                 BooleanFieldEditor makeClear =
33                         new BooleanFieldEditor(IPreferenceConstants.OUTPUT_MAKE_CLEAR, "Clear up", getFieldEditorParent());
34                 addField(makeClear);
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());
41                 addField(stripWord);
42                 //               public static final String OUTPUT_ENCLOSE_BODY_TEXT = "__out_encloseBodyTexr";
43                 BooleanFieldEditor encloseText =
44                         new BooleanFieldEditor(
45                                 IPreferenceConstants.OUTPUT_ENCLOSE_BODY_TEXT,
46                                 "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,
53                                 "Enclose Block Text",
54                                 getFieldEditorParent());
55                 addField(encloseBlock);
56
57                 //               public static final String OUTPUT_DEFAULT_ALT_TEXT = "__out_alt_text";
58                 StringFieldEditor defaultAlt =
59                         new StringFieldEditor(
60                                 IPreferenceConstants.OUTPUT_DEFAULT_ALT_TEXT,
61                                 "Default Alt Text",
62                                 getFieldEditorParent());
63                 addField(defaultAlt);
64         }
65
66         /**
67          * @see IWorkbenchPreferencePage#init
68          */
69         public void init(IWorkbench workbench) {
70         }
71 }