package net.sourceforge.phpdt.tidy.preferences; import net.sourceforge.phpdt.tidy.JtidyPlugin; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; /** * A preference page for a simple HTML editor. */ public class JTidyWrapIndentPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceConstants { public JTidyWrapIndentPreferences() { super(FieldEditorPreferencePage.GRID); // Set the preference store for the preference page. IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore(); setPreferenceStore(store); } /** * @see org.eclipse.jface.preference. * FieldEditorPreferencePage#createFieldEditors() */ protected void createFieldEditors() { BooleanFieldEditor wrapAttVals = new BooleanFieldEditor(WRAP_ATT_VALS, "Wrap attributes", getFieldEditorParent()); addField(wrapAttVals); // public static final String OUTPUT_STRIP_WORD = "__out_strip_Word"; BooleanFieldEditor wrapScriplets = new BooleanFieldEditor(WRAP_SCRIPTLETS, "Wrap script literals", getFieldEditorParent()); addField(wrapScriplets); BooleanFieldEditor wrapSection = new BooleanFieldEditor(WRAP_SECTION, "Wrap Section", getFieldEditorParent()); addField(wrapSection); // public static final String OUTPUT_ENCLOSE_BLOCK_TEXT = "__out_encloseBlock"; BooleanFieldEditor wrapASP = new BooleanFieldEditor(WRAP_ASP, "Wrap ASP", getFieldEditorParent()); addField(wrapASP); BooleanFieldEditor wrapJSTE = new BooleanFieldEditor(WRAP_JSTE, "Wrap JSTE", getFieldEditorParent()); addField(wrapJSTE); BooleanFieldEditor wrapPHP = new BooleanFieldEditor(WRAP_PHP, "Wrap PHP", getFieldEditorParent()); addField(wrapPHP); BooleanFieldEditor indentAttr = new BooleanFieldEditor(INDENT_ATTRIBUTES, "Indent Attributes", getFieldEditorParent()); addField(indentAttr); BooleanFieldEditor literalAttr = new BooleanFieldEditor(LITERAL_ATTRIBS, "Literal Attributes", getFieldEditorParent()); addField(literalAttr); } /** * @see IWorkbenchPreferencePage#init */ public void init(IWorkbench workbench) { } }