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 JTidyOutputLookPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
15 public JTidyOutputLookPreferences() {
16 super(FieldEditorPreferencePage.GRID);
18 // Set the preference store for the preference page.
19 IPreferenceStore store = JtidyPlugin.getDefault().getPreferenceStore();
20 setPreferenceStore(store);
24 * @see org.eclipse.jface.preference.
25 * FieldEditorPreferencePage#createFieldEditors()
27 protected void createFieldEditors() {
28 // public static final String OUT_UPPER_TAGS = "__out_upper_Tags";
29 BooleanFieldEditor useUpperTags =
30 new BooleanFieldEditor(IPreferenceConstants.OUT_UPPER_TAGS, "Uppercase Tags", getFieldEditorParent());
31 addField(useUpperTags);
33 // public static final String OUT_UPPER_ATTR = "__out_upper_attr";
34 BooleanFieldEditor useUpperAttr =
35 new BooleanFieldEditor(IPreferenceConstants.OUT_UPPER_ATTR, "Uppercase Atributes", getFieldEditorParent());
36 addField(useUpperAttr);
38 // public static final String OUT_BREAK_BR = "__out_break_befor_br";
40 BooleanFieldEditor breakBr =
41 new BooleanFieldEditor(IPreferenceConstants.OUT_BREAK_BR, "Break before BR", getFieldEditorParent());
43 // public static final String OUT_WRAP_ATTR_VALUES = "__out_wrap_Attr_values";
44 BooleanFieldEditor warpAttrValues =
45 new BooleanFieldEditor(
46 IPreferenceConstants.OUT_WRAP_ATTR_VALUES,
47 "Wrap Attribute Values",
48 getFieldEditorParent());
49 addField(warpAttrValues);
51 // public static final String OUT_WRAP_SCRIPS = "__out_wrap_scripts";
52 BooleanFieldEditor warpScripts =
53 new BooleanFieldEditor(IPreferenceConstants.OUT_WRAP_SCRIPS, "Wrap Scripts", getFieldEditorParent());
54 addField(warpScripts);
56 // public static final String OUT_AS_RAW = "__out_as_raw";
58 BooleanFieldEditor asRaw =
59 new BooleanFieldEditor(IPreferenceConstants.OUT_AS_RAW, "Output >128 chars as raw", getFieldEditorParent());
65 * @see IWorkbenchPreferencePage#init
67 public void init(IWorkbench workbench) {