we now extend PHPSegmentWithChildren
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPEclipsePreferencePage.java
index 065a53d..8a047f1 100644 (file)
@@ -15,6 +15,7 @@ import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.DirectoryFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
 import org.eclipse.jface.preference.StringFieldEditor;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -60,6 +61,32 @@ public class PHPEclipsePreferencePage extends FieldEditorPreferencePage implemen
     StringFieldEditor externalParser =
       new StringFieldEditor(PHPeclipsePlugin.EXTERNAL_PARSER_PREF, "&External Parser command:", 60, getFieldEditorParent());
 
+
+  RadioGroupFieldEditor chooseParser = new RadioGroupFieldEditor(
+    IPreferenceConstants.PHP_PARSER_DEFAULT,
+    "Choose PHP parser",
+    1,
+    new String[][] {
+      {"Internal parser", 
+       IPreferenceConstants.PHP_INTERNAL_PARSER
+      },
+      {"External parser", 
+       IPreferenceConstants.PHP_EXTERNAL_PARSER
+      }
+    },
+    this.getFieldEditorParent());
+    
+    BooleanFieldEditor parseOnSave =
+      new BooleanFieldEditor(PHPeclipsePlugin.PHP_PARSE_ON_SAVE, "&Parse automatically on save", getFieldEditorParent());
+
+      BooleanFieldEditor outlineShowClass =
+        new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_CLASS, "Show classes in outline", getFieldEditorParent());
+      BooleanFieldEditor outlineShowFunc =
+        new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_FUNC, "Show functions in outline", getFieldEditorParent());
+      BooleanFieldEditor outlineShowVar =
+        new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_VAR, "Show variables in outline", getFieldEditorParent());
+
+    
     addField(localhost);
     addField(documentRoot);
     addField(useExternalBrowser);
@@ -71,6 +98,12 @@ public class PHPEclipsePreferencePage extends FieldEditorPreferencePage implemen
     addField(restartApache);
     
     addField(externalParser);
+    
+    addField(chooseParser);
+    addField(parseOnSave);
+    addField(outlineShowClass) ;
+    addField(outlineShowFunc);
+    addField(outlineShowVar);
   }
 
   /**