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.ui.IWorkbench;
8 import org.eclipse.ui.IWorkbenchPreferencePage;
11 * A preference page for a simple HTML editor.
13 public class JTidyWrapIndentPreferences
14 extends FieldEditorPreferencePage
15 implements IWorkbenchPreferencePage, IPreferenceConstants {
17 public JTidyWrapIndentPreferences() {
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 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);
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());
43 BooleanFieldEditor wrapJSTE = new BooleanFieldEditor(WRAP_JSTE, "Wrap JSTE", getFieldEditorParent());
46 BooleanFieldEditor wrapPHP = new BooleanFieldEditor(WRAP_PHP, "Wrap PHP", getFieldEditorParent());
49 BooleanFieldEditor indentAttr = new BooleanFieldEditor(INDENT_ATTRIBUTES, "Indent Attributes", getFieldEditorParent());
52 BooleanFieldEditor literalAttr = new BooleanFieldEditor(LITERAL_ATTRIBS, "Literal Attributes", getFieldEditorParent());
53 addField(literalAttr);
57 * @see IWorkbenchPreferencePage#init
59 public void init(IWorkbench workbench) {