intial version
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.jtidy / src / net / sourceforge / phpdt / tidy / preferences / JTidyOutputPreferences.java
diff --git a/archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/preferences/JTidyOutputPreferences.java b/archive/net.sourceforge.phpeclipse.jtidy/src/net/sourceforge/phpdt/tidy/preferences/JTidyOutputPreferences.java
new file mode 100644 (file)
index 0000000..16fe26e
--- /dev/null
@@ -0,0 +1,71 @@
+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.jface.preference.StringFieldEditor;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * A preference page for a simple HTML editor.
+ */
+public class JTidyOutputPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+       public JTidyOutputPreferences() {
+               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() {
+
+               //               public static final String OUTPUT_MAKE_CLEAR   = "__out_make_clear";
+
+               BooleanFieldEditor makeClear =
+                       new BooleanFieldEditor(IPreferenceConstants.OUTPUT_MAKE_CLEAR, "Clear up", getFieldEditorParent());
+               addField(makeClear);
+               //               public static final String OUTPUT_STRIP_WORD   = "__out_strip_Word";
+               BooleanFieldEditor stripWord =
+                       new BooleanFieldEditor(
+                               IPreferenceConstants.OUTPUT_STRIP_WORD,
+                               "Strip Word 2000 thingies",
+                               getFieldEditorParent());
+               addField(stripWord);
+               //               public static final String OUTPUT_ENCLOSE_BODY_TEXT = "__out_encloseBodyTexr";
+               BooleanFieldEditor encloseText =
+                       new BooleanFieldEditor(
+                               IPreferenceConstants.OUTPUT_ENCLOSE_BODY_TEXT,
+                               "Enclose Body Text",
+                               getFieldEditorParent());
+               addField(encloseText);
+               //               public static final String OUTPUT_ENCLOSE_BLOCK_TEXT   = "__out_encloseBlock";
+               BooleanFieldEditor encloseBlock =
+                       new BooleanFieldEditor(
+                               IPreferenceConstants.OUTPUT_ENCLOSE_BLOCK_TEXT,
+                               "Enclose Block Text",
+                               getFieldEditorParent());
+               addField(encloseBlock);
+
+               //               public static final String OUTPUT_DEFAULT_ALT_TEXT = "__out_alt_text";
+               StringFieldEditor defaultAlt =
+                       new StringFieldEditor(
+                               IPreferenceConstants.OUTPUT_DEFAULT_ALT_TEXT,
+                               "Default Alt Text",
+                               getFieldEditorParent());
+               addField(defaultAlt);
+       }
+
+       /**
+        * @see IWorkbenchPreferencePage#init
+        */
+       public void init(IWorkbench workbench) {
+       }
+}