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