pulled up setMarker in PHPParserSuperclass
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPSyntaxEditorPreferencePage.java
index bc72d20..ecf3654 100644 (file)
@@ -7,9 +7,12 @@ import java.util.Map;
 import net.sourceforge.phpeclipse.preferences.ColorEditor;
 import net.sourceforge.phpeclipse.preferences.OverlayPreferenceStore;
 import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages;
+
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.FileFieldEditor;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.IntegerFieldEditor;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.text.source.ISourceViewer;
@@ -124,6 +127,9 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
   private Button ItalicCheckBox;
   private Button UnderlineCheckBox;
   private FileFieldEditor userdefPHPSyntaxFileFFE;
+  private BooleanFieldEditor showLineNumber;
+  private IntegerFieldEditor formatterTabSize;
+  private BooleanFieldEditor spacesForTabs;
 
   public PHPSyntaxEditorPreferencePage() {
     setDescription(PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.description")); //$NON-NLS-1$
@@ -398,6 +404,25 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     backgroundOptionPage(backgroundOptionsGroup);
 
     initialize();
+    
+   
+    showLineNumber = new BooleanFieldEditor(PHPeclipsePlugin.LINE_NUMBER_RULER, 
+    "Show line numbers", composite);
+    showLineNumber.setPreferencePage(this);
+    showLineNumber.setPreferenceStore(getPreferenceStore());
+    showLineNumber.load();
+    
+//    formatterTabSize = new IntegerFieldEditor(PHPeclipsePlugin.FORMATTER_TAB_SIZE, 
+//    "Displayed tab width", composite, 3);
+//    formatterTabSize.setPreferencePage(this);
+//    formatterTabSize.setPreferenceStore(getPreferenceStore());
+//    formatterTabSize.load();
+//    
+//    spacesForTabs = new BooleanFieldEditor(PHPeclipsePlugin.SPACES_FOR_TABS, 
+//    "Spaces for Tabs", composite);
+//    spacesForTabs.setPreferencePage(this);
+//    spacesForTabs.setPreferenceStore(getPreferenceStore());
+//    spacesForTabs.load();
     return composite;
   }
 
@@ -438,6 +463,9 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     IPreferenceStore store = getPreferenceStore();
     PHPeclipsePlugin.getDefault().savePluginPreferences();
     userdefPHPSyntaxFileFFE.store();
+    showLineNumber.store();
+    spacesForTabs.store();
+    formatterTabSize.store();
     return true;
   }
 
@@ -446,6 +474,10 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     initializeFields();
     handleSyntaxColorListSelection();
     userdefPHPSyntaxFileFFE.loadDefault();
+    showLineNumber.loadDefault();
+    spacesForTabs.loadDefault();
+    showLineNumber.loadDefault();
+    formatterTabSize.loadDefault();
     super.performDefaults();
   }