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.ui.IWorkbench;
9 import org.eclipse.ui.IWorkbenchPreferencePage;
12 * A preference page for a simple HTML editor.
14 public class JTidyWrapIndentPreferences
15 extends FieldEditorPreferencePage
16 implements IWorkbenchPreferencePage, IPreferenceConstants {
18 public JTidyWrapIndentPreferences() {
19 super(FieldEditorPreferencePage.GRID);
21 // Set the preference store for the preference page.
22 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
23 setPreferenceStore(store);
27 * @see org.eclipse.jface.preference.
28 * FieldEditorPreferencePage#createFieldEditors()
30 protected void createFieldEditors() {
32 BooleanFieldEditor wrapAttVals = new BooleanFieldEditor(WRAP_ATT_VALS, "Wrap attributes", getFieldEditorParent());
33 addField(wrapAttVals);
34 // public static final String OUTPUT_STRIP_WORD = "__out_strip_Word";
35 BooleanFieldEditor wrapScriplets = new BooleanFieldEditor(WRAP_SCRIPTLETS, "Wrap script literals", getFieldEditorParent());
36 addField(wrapScriplets);
38 BooleanFieldEditor wrapSection = new BooleanFieldEditor(WRAP_SECTION, "Wrap Section", getFieldEditorParent());
39 addField(wrapSection);
40 // public static final String OUTPUT_ENCLOSE_BLOCK_TEXT = "__out_encloseBlock";
41 BooleanFieldEditor wrapASP = new BooleanFieldEditor(WRAP_ASP, "Wrap ASP", getFieldEditorParent());
44 BooleanFieldEditor wrapJSTE = new BooleanFieldEditor(WRAP_JSTE, "Wrap JSTE", getFieldEditorParent());
47 BooleanFieldEditor wrapPHP = new BooleanFieldEditor(WRAP_PHP, "Wrap PHP", getFieldEditorParent());
50 BooleanFieldEditor indentAttr = new BooleanFieldEditor(INDENT_ATTRIBUTES, "Indent Attributes", getFieldEditorParent());
53 BooleanFieldEditor literalAttr = new BooleanFieldEditor(LITERAL_ATTRIBS, "Literal Attributes", getFieldEditorParent());
54 addField(literalAttr);
58 * @see IWorkbenchPreferencePage#init
60 public void init(IWorkbench workbench) {