intial version
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.jtidy / src / net / sourceforge / phpdt / tidy / preferences / JTidyWrapIndentPreferences.java
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.ui.IWorkbench;
8 import org.eclipse.ui.IWorkbenchPreferencePage;
9
10 /**
11  * A preference page for a simple HTML editor.
12  */
13 public class JTidyWrapIndentPreferences
14   extends FieldEditorPreferencePage
15   implements IWorkbenchPreferencePage, IPreferenceConstants {
16
17   public JTidyWrapIndentPreferences() {
18     super(FieldEditorPreferencePage.GRID);
19
20     // Set the preference store for the preference page.
21     IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
22     setPreferenceStore(store);
23   }
24
25   /**
26    * @see org.eclipse.jface.preference.
27    * FieldEditorPreferencePage#createFieldEditors()
28    */
29   protected void createFieldEditors() {
30
31     BooleanFieldEditor wrapAttVals = new BooleanFieldEditor(WRAP_ATT_VALS, "Wrap attributes", getFieldEditorParent());
32     addField(wrapAttVals);
33     //           public static final String OUTPUT_STRIP_WORD   = "__out_strip_Word";
34     BooleanFieldEditor wrapScriplets = new BooleanFieldEditor(WRAP_SCRIPTLETS, "Wrap script literals", getFieldEditorParent());
35     addField(wrapScriplets);
36
37     BooleanFieldEditor wrapSection = new BooleanFieldEditor(WRAP_SECTION, "Wrap Section", getFieldEditorParent());
38     addField(wrapSection);
39     //           public static final String OUTPUT_ENCLOSE_BLOCK_TEXT   = "__out_encloseBlock";
40     BooleanFieldEditor wrapASP = new BooleanFieldEditor(WRAP_ASP, "Wrap ASP", getFieldEditorParent());
41     addField(wrapASP);
42
43     BooleanFieldEditor wrapJSTE = new BooleanFieldEditor(WRAP_JSTE, "Wrap JSTE", getFieldEditorParent());
44     addField(wrapJSTE);
45
46     BooleanFieldEditor wrapPHP = new BooleanFieldEditor(WRAP_PHP, "Wrap PHP", getFieldEditorParent());
47     addField(wrapPHP);
48
49     BooleanFieldEditor indentAttr = new BooleanFieldEditor(INDENT_ATTRIBUTES, "Indent Attributes", getFieldEditorParent());
50     addField(indentAttr);
51
52     BooleanFieldEditor literalAttr = new BooleanFieldEditor(LITERAL_ATTRIBS, "Literal Attributes", getFieldEditorParent());
53     addField(literalAttr);
54   }
55
56   /**
57    * @see IWorkbenchPreferencePage#init
58    */
59   public void init(IWorkbench workbench) {
60   }
61 }