PHP highlighting colors could now be managed by the new PreferencePage
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPSyntaxEditorPreferencePage.java
index ecf3654..7e2ebf9 100644 (file)
@@ -78,7 +78,8 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
       new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_DEFAULT_ITALIC),
       new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IPreferenceConstants.PHP_DEFAULT_UNDERLINE),
       new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_USERDEF_XMLFILE),
-      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_EDITOR_BACKGROUND)};
+  //    new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IPreferenceConstants.PHP_EDITOR_BACKGROUND)
+  };
 
   private final String[][] SyntaxColorListModel =
     new String[][] {
@@ -127,7 +128,7 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
   private Button ItalicCheckBox;
   private Button UnderlineCheckBox;
   private FileFieldEditor userdefPHPSyntaxFileFFE;
-  private BooleanFieldEditor showLineNumber;
+  // private BooleanFieldEditor showLineNumber;
   private IntegerFieldEditor formatterTabSize;
   private BooleanFieldEditor spacesForTabs;
 
@@ -164,21 +165,21 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     GridData gd = new GridData();
     gd.horizontalAlignment = GridData.BEGINNING;
     label.setLayoutData(gd);
-    final ColorEditor syntaxBackgroundColorEditor = new ColorEditor(parent);
-    RGB rgb = PreferenceConverter.getColor(OverlayStore, IPreferenceConstants.PHP_EDITOR_BACKGROUND);
-    syntaxBackgroundColorEditor.setColorValue(rgb);
-    Button backgroundColorButton = syntaxBackgroundColorEditor.getButton();
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    backgroundColorButton.setLayoutData(gd);
-    backgroundColorButton.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        PreferenceConverter.setValue(OverlayStore, IPreferenceConstants.PHP_EDITOR_BACKGROUND, syntaxBackgroundColorEditor.getColorValue());
-      }
-    });
+//    final ColorEditor syntaxBackgroundColorEditor = new ColorEditor(parent);
+//    RGB rgb = PreferenceConverter.getColor(OverlayStore, IPreferenceConstants.PHP_EDITOR_BACKGROUND);
+//    syntaxBackgroundColorEditor.setColorValue(rgb);
+//    Button backgroundColorButton = syntaxBackgroundColorEditor.getButton();
+//    gd = new GridData(GridData.FILL_HORIZONTAL);
+//    gd.horizontalAlignment = GridData.BEGINNING;
+//    backgroundColorButton.setLayoutData(gd);
+//    backgroundColorButton.addSelectionListener(new SelectionListener() {
+//      public void widgetDefaultSelected(SelectionEvent e) {
+//        // do nothing
+//      }
+//      public void widgetSelected(SelectionEvent e) {
+//        PreferenceConverter.setValue(OverlayStore, IPreferenceConstants.PHP_EDITOR_BACKGROUND, syntaxBackgroundColorEditor.getColorValue());
+//      }
+//    });
   }
 
   /**
@@ -406,11 +407,11 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     initialize();
     
    
-    showLineNumber = new BooleanFieldEditor(PHPeclipsePlugin.LINE_NUMBER_RULER, 
-    "Show line numbers", composite);
-    showLineNumber.setPreferencePage(this);
-    showLineNumber.setPreferenceStore(getPreferenceStore());
-    showLineNumber.load();
+//    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);
@@ -463,7 +464,7 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     IPreferenceStore store = getPreferenceStore();
     PHPeclipsePlugin.getDefault().savePluginPreferences();
     userdefPHPSyntaxFileFFE.store();
-    showLineNumber.store();
+   // showLineNumber.store();
     spacesForTabs.store();
     formatterTabSize.store();
     return true;
@@ -474,9 +475,9 @@ public class PHPSyntaxEditorPreferencePage extends PreferencePage implements IWo
     initializeFields();
     handleSyntaxColorListSelection();
     userdefPHPSyntaxFileFFE.loadDefault();
-    showLineNumber.loadDefault();
+  //  showLineNumber.loadDefault();
     spacesForTabs.loadDefault();
-    showLineNumber.loadDefault();
+  //  showLineNumber.loadDefault();
     formatterTabSize.loadDefault();
     super.performDefaults();
   }