fixed Bug 1024299
authorjsurfer <jsurfer>
Thu, 9 Sep 2004 07:46:59 +0000 (07:46 +0000)
committerjsurfer <jsurfer>
Thu, 9 Sep 2004 07:46:59 +0000 (07:46 +0000)
net.sourceforge.phpeclipse/plugin.xml
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/JavaEditorPreferencePage.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/PHPEditorPreferencePage.java [deleted file]
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/PreferencesMessages.properties
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/ui/PreferenceConstants.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPProjectLibraryPage.java

index 7d4e3e2..e0439f7 100644 (file)
             class="net.sourceforge.phpdt.internal.ui.preferences.CodeFormatterPreferencePage"
             id="net.sourceforge.phpeclipse.preference.CodeFormatterPreferencePage">
       </page>
-   <!--    <page
-            name="Editor"
-            category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
-            class="net.sourceforge.phpdt.internal.ui.preferences.PHPEditorPreferencePage"
-            id="net.sourceforge.phpeclipse.preference.PHPEditorPreferencePage">
-      </page> -->
       <page name="Editor"
             category="net.sourceforge.phpeclipse.preference.PHPEclipsePreferencePage"
             class="net.sourceforge.phpdt.internal.ui.preferences.JavaEditorPreferencePage"
index 30cbe67..261ba23 100644 (file)
@@ -80,14 +80,12 @@ import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
 /**
  * The page for setting the editor options.
  */
-public class JavaEditorPreferencePage extends PreferencePage implements
-    IWorkbenchPreferencePage {
+public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
   private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX;
 
   private static final String COMPILER_TASK_TAGS = JavaCore.COMPILER_TASK_TAGS;
 
-  private static final String DELIMITER = PreferencesMessages
-      .getString("JavaEditorPreferencePage.navigation.delimiter"); //$NON-NLS-1$
+  private static final String DELIMITER = PreferencesMessages.getString("JavaEditorPreferencePage.navigation.delimiter"); //$NON-NLS-1$
 
   /** The keys of the overlay store. */
   public final OverlayPreferenceStore.OverlayKey[] fKeys;
@@ -125,91 +123,56 @@ public class JavaEditorPreferencePage extends PreferencePage implements
       //               {
       // PreferencesMessages.getString("JavaEditorPreferencePage.javaDocOthers"),
       // PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("PHPEditorPreferencePage.multiLineComment"),
+      { PreferencesMessages.getString("PHPEditorPreferencePage.multiLineComment"),
           PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("PHPEditorPreferencePage.singleLineComment"),
+      { PreferencesMessages.getString("PHPEditorPreferencePage.singleLineComment"),
           PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.tags"),
-          PreferenceConstants.EDITOR_PHP_TAG_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.tags"), PreferenceConstants.EDITOR_PHP_TAG_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.keywords"),
-          PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR },
-      { PreferencesMessages.getString("PHPEditorPreferencePage.functionNames"),
-          PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.keywords"), PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.functionNames"), PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.variables"),
-          PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.variables"), PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.constants"),
-          PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.constants"), PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.types"),
-          PreferenceConstants.EDITOR_PHP_TYPE_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.types"), PreferenceConstants.EDITOR_PHP_TYPE_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.strings"),
-          PreferenceConstants.EDITOR_STRING_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.strings"), PreferenceConstants.EDITOR_STRING_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.others"),
-          PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
-      { PreferencesMessages.getString("JavaEditorPreferencePage.operators"),
-          PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.others"), PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR }, //$NON-NLS-1$
+      { PreferencesMessages.getString("JavaEditorPreferencePage.operators"), PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.returnKeyword"),
+      { PreferencesMessages.getString("JavaEditorPreferencePage.returnKeyword"),
           PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("PHPEditorPreferencePage.phpDocKeywords"),
-          PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocKeywords"), PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("PHPEditorPreferencePage.phpDocHtmlTags"),
-          PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocHtmlTags"), PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocLinks"),
-          PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR },
+      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocLinks"), PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocOthers"),
-          PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$
+      { PreferencesMessages.getString("PHPEditorPreferencePage.phpDocOthers"), PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR } //$NON-NLS-1$
   };
 
   private final String[][] fAppearanceColorListModel = new String[][] {
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.lineNumberForegroundColor"),
+      { PreferencesMessages.getString("JavaEditorPreferencePage.lineNumberForegroundColor"),
           AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"),
+      { PreferencesMessages.getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"),
           PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.currentLineHighlighColor"),
+      { PreferencesMessages.getString("JavaEditorPreferencePage.currentLineHighlighColor"),
           AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.printMarginColor2"),
+      { PreferencesMessages.getString("JavaEditorPreferencePage.printMarginColor2"),
           AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR },
       //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.findScopeColor2"),
-          PreferenceConstants.EDITOR_FIND_SCOPE_COLOR },
+      { PreferencesMessages.getString("JavaEditorPreferencePage.findScopeColor2"), PreferenceConstants.EDITOR_FIND_SCOPE_COLOR },
       //$NON-NLS-1$
-      { PreferencesMessages.getString("JavaEditorPreferencePage.linkColor2"),
-          PreferenceConstants.EDITOR_LINK_COLOR }, //$NON-NLS-1$
+      { PreferencesMessages.getString("JavaEditorPreferencePage.linkColor2"), PreferenceConstants.EDITOR_LINK_COLOR }, //$NON-NLS-1$
   };
 
   //  private final String[][] fAnnotationColorListModel;
@@ -258,8 +221,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
 
     public void widgetSelected(SelectionEvent e) {
       Button button = (Button) e.widget;
-      fOverlayStore.setValue((String) fCheckBoxes.get(button), button
-          .getSelection());
+      fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
     }
   };
 
@@ -305,7 +267,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
 
   private Button fBoldCheckBox;
 
-//  private Button fAddJavaDocTagsButton;
+  //  private Button fAddJavaDocTagsButton;
 
   private Button fEscapeStringsButton;
 
@@ -346,8 +308,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
    * Creates a new preference page.
    */
   public JavaEditorPreferencePage() {
-    setDescription(PreferencesMessages
-        .getString("JavaEditorPreferencePage.description")); //$NON-NLS-1$
+    setDescription(PreferencesMessages.getString("JavaEditorPreferencePage.description")); //$NON-NLS-1$
     setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
     MarkerAnnotationPreferences markerAnnotationPreferences = new MarkerAnnotationPreferences();
     fKeys = createOverlayStoreKeys(markerAnnotationPreferences);
@@ -356,161 +317,103 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     // createAnnotationTypeListModel(markerAnnotationPreferences);
   }
 
-  private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(
-      MarkerAnnotationPreferences preferences) {
+  private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(MarkerAnnotationPreferences preferences) {
     ArrayList overlayKeys = new ArrayList();
     Iterator e = preferences.getAnnotationPreferences().iterator();
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_FOREGROUND_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_BACKGROUND_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.INT, PreferenceConstants.EDITOR_TAB_WIDTH));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, PreferenceConstants.EDITOR_TAB_WIDTH));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD));
 
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            PreferenceConstants.EDITOR_PHP_TAG_COLOR));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_PHP_TAG_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_PHP_TAG_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_PHP_TAG_BOLD));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_PHP_TYPE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_PHP_TYPE_BOLD));
-
     overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            PreferenceConstants.EDITOR_STRING_COLOR));
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_PHP_TYPE_COLOR));
     overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_STRING_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_PHP_TYPE_BOLD));
+
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_STRING_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_STRING_BOLD));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_TASK_TAG_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_TASK_TAG_BOLD));
+    overlayKeys
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_TASK_TAG_COLOR));
+    overlayKeys
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_TASK_TAG_BOLD));
     //         overlayKeys.add(new
     // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
     // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR));
     //         overlayKeys.add(new
     // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
     // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_PHP_OPERATOR_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_PHP_OPERATOR_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_PHP_KEYWORD_RETURN_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_MATCHING_BRACKETS));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
+        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.INT,
-            AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
+        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
+        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN));
     //         overlayKeys.add(new
     // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
@@ -518,162 +421,109 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     //         overlayKeys.add(new
     // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
     // PreferenceConstants.EDITOR_STICKY_OCCURRENCES));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_FIND_SCOPE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_LINK_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_LINK_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_CORRECTION_INDICATION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
+        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_SPACES_FOR_TABS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_AUTOACTIVATION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.INT,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
         PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_AUTOINSERT));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.CODEASSIST_AUTOINSERT));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_ORDER_PROPOSALS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_CASE_SENSITIVITY));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_ADDIMPORT));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.CODEASSIST_ADDIMPORT));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_INSERT_COMPLETION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_SMART_PASTE));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_SMART_PASTE));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+        PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
+        PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP));
-//    overlayKeys
-//        .add(new OverlayPreferenceStore.OverlayKey(
-//            OverlayPreferenceStore.BOOLEAN,
-//            PreferenceConstants.EDITOR_CLOSE_BRACES));
-//    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-//        OverlayPreferenceStore.BOOLEAN,
-//        PreferenceConstants.EDITOR_CLOSE_JAVADOCS));
+    //    overlayKeys
+    //        .add(new OverlayPreferenceStore.OverlayKey(
+    //            OverlayPreferenceStore.BOOLEAN,
+    //            PreferenceConstants.EDITOR_CLOSE_BRACES));
+    //    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
+    //        OverlayPreferenceStore.BOOLEAN,
+    //        PreferenceConstants.EDITOR_CLOSE_JAVADOCS));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_WRAP_STRINGS));
     overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_WRAP_STRINGS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_ESCAPE_STRINGS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_ESCAPE_STRINGS));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_SMART_HOME_END));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys
+        .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_SMART_HOME_END));
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE));
     //         overlayKeys.add(new
     // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
     // PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
         PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
+    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
         PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK));
     while (e.hasNext()) {
       AnnotationPreference info = (AnnotationPreference) e.next();
-      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-          OverlayPreferenceStore.STRING, info.getColorPreferenceKey()));
-      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-          OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey()));
+      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getColorPreferenceKey()));
+      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey()));
       if (info.getHighlightPreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey()));
-      overlayKeys
-          .add(new OverlayPreferenceStore.OverlayKey(
-              OverlayPreferenceStore.BOOLEAN, info
-                  .getOverviewRulerPreferenceKey()));
+        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey()));
+      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getOverviewRulerPreferenceKey()));
       if (info.getVerticalRulerPreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN, info
-                .getVerticalRulerPreferenceKey()));
+        overlayKeys
+            .add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getVerticalRulerPreferenceKey()));
       if (info.getTextStylePreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING, info.getTextStylePreferenceKey()));
+        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getTextStylePreferenceKey()));
     }
-    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys
-        .size()];
+    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
     overlayKeys.toArray(keys);
     return keys;
   } /*
@@ -688,8 +538,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
    */
   public void createControl(Composite parent) {
     super.createControl(parent);
-    WorkbenchHelp.setHelp(getControl(),
-        IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
+    WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
   }
 
   private void handleSyntaxColorListSelection() {
@@ -762,36 +611,27 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     colorComposite.setLayout(new GridLayout());
     Group backgroundComposite = new Group(colorComposite, SWT.SHADOW_ETCHED_IN);
     backgroundComposite.setLayout(new RowLayout());
-    backgroundComposite.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.backgroundColor"));//$NON-NLS-1$
+    backgroundComposite.setText(PreferencesMessages.getString("JavaEditorPreferencePage.backgroundColor"));//$NON-NLS-1$
     SelectionListener backgroundSelectionListener = new SelectionListener() {
       public void widgetSelected(SelectionEvent e) {
         boolean custom = fBackgroundCustomRadioButton.getSelection();
         fBackgroundColorButton.setEnabled(custom);
-        fOverlayStore.setValue(
-            PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR, !custom);
+        fOverlayStore.setValue(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR, !custom);
       }
 
       public void widgetDefaultSelected(SelectionEvent e) {
       }
     };
-    fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO
-        | SWT.LEFT);
-    fBackgroundDefaultRadioButton.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.systemDefault")); //$NON-NLS-1$
-    fBackgroundDefaultRadioButton
-        .addSelectionListener(backgroundSelectionListener);
-    fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO
-        | SWT.LEFT);
-    fBackgroundCustomRadioButton.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.custom")); //$NON-NLS-1$
-    fBackgroundCustomRadioButton
-        .addSelectionListener(backgroundSelectionListener);
+    fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
+    fBackgroundDefaultRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.systemDefault")); //$NON-NLS-1$
+    fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener);
+    fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
+    fBackgroundCustomRadioButton.setText(PreferencesMessages.getString("JavaEditorPreferencePage.custom")); //$NON-NLS-1$
+    fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener);
     fBackgroundColorEditor = new ColorEditor(backgroundComposite);
     fBackgroundColorButton = fBackgroundColorEditor.getButton();
     Label label = new Label(colorComposite, SWT.LEFT);
-    label.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.foreground")); //$NON-NLS-1$
+    label.setText(PreferencesMessages.getString("JavaEditorPreferencePage.foreground")); //$NON-NLS-1$
     label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
     Composite editorComposite = new Composite(colorComposite, SWT.NONE);
     GridLayout layout = new GridLayout();
@@ -801,8 +641,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     editorComposite.setLayout(layout);
     GridData gd = new GridData(GridData.FILL_BOTH);
     editorComposite.setLayoutData(gd);
-    fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
-        | SWT.BORDER);
+    fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
     gd = new GridData(GridData.FILL_BOTH);
     gd.heightHint = convertHeightInCharsToPixels(5);
     fSyntaxColorList.setLayoutData(gd);
@@ -814,8 +653,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     stylesComposite.setLayout(layout);
     stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
     label = new Label(stylesComposite, SWT.LEFT);
-    label.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.color")); //$NON-NLS-1$
+    label.setText(PreferencesMessages.getString("JavaEditorPreferencePage.color")); //$NON-NLS-1$
     gd = new GridData();
     gd.horizontalAlignment = GridData.BEGINNING;
     label.setLayoutData(gd);
@@ -825,15 +663,13 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     gd.horizontalAlignment = GridData.BEGINNING;
     foregroundColorButton.setLayoutData(gd);
     fBoldCheckBox = new Button(stylesComposite, SWT.CHECK);
-    fBoldCheckBox.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.bold")); //$NON-NLS-1$
+    fBoldCheckBox.setText(PreferencesMessages.getString("JavaEditorPreferencePage.bold")); //$NON-NLS-1$
     gd = new GridData(GridData.FILL_HORIZONTAL);
     gd.horizontalAlignment = GridData.BEGINNING;
     gd.horizontalSpan = 2;
     fBoldCheckBox.setLayoutData(gd);
     label = new Label(colorComposite, SWT.LEFT);
-    label.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.preview")); //$NON-NLS-1$
+    label.setText(PreferencesMessages.getString("JavaEditorPreferencePage.preview")); //$NON-NLS-1$
     label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
     Control previewer = createPreviewer(colorComposite);
     gd = new GridData(GridData.FILL_BOTH);
@@ -857,8 +693,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
       public void widgetSelected(SelectionEvent e) {
         int i = fSyntaxColorList.getSelectionIndex();
         String key = fSyntaxColorListModel[i][1];
-        PreferenceConverter.setValue(fOverlayStore, key,
-            fSyntaxForegroundColorEditor.getColorValue());
+        PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue());
       }
     });
     fBackgroundColorButton.addSelectionListener(new SelectionListener() {
@@ -867,9 +702,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
       }
 
       public void widgetSelected(SelectionEvent e) {
-        PreferenceConverter.setValue(fOverlayStore,
-            PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor
-                .getColorValue());
+        PreferenceConverter.setValue(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor
+            .getColorValue());
       }
     });
     fBoldCheckBox.addSelectionListener(new SelectionListener() {
@@ -890,25 +724,20 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     Preferences coreStore = createTemporaryCorePreferenceStore();
     fJavaTextTools = new JavaTextTools(fOverlayStore, coreStore, false);
     IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();
-    IPreferenceStore store = new ChainedPreferenceStore(new IPreferenceStore[] {
-        fOverlayStore,
-        new PreferencesAdapter(createTemporaryCorePreferenceStore()),
-        generalTextStore });
+    IPreferenceStore store = new ChainedPreferenceStore(new IPreferenceStore[] { fOverlayStore,
+        new PreferencesAdapter(createTemporaryCorePreferenceStore()), generalTextStore });
 
-    fPreviewViewer = new JavaSourceViewer(parent, null, null, false,
-        SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store);
+    fPreviewViewer = new JavaSourceViewer(parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, store);
 
-    fPreviewViewer.configure(new PHPSourceViewerConfiguration(fJavaTextTools,
-        null, IPHPPartitions.PHP_PARTITIONING));
+    fPreviewViewer.configure(new PHPSourceViewerConfiguration(fJavaTextTools, null, IPHPPartitions.PHP_PARTITIONING));
     //         Font font= JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT);
     //         fPreviewViewer.getTextWidget().setFont(font);
-    fPreviewViewer.getTextWidget().setFont(
-        JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
+    fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
     //         new JavaSourcePreviewerUpdater(fPreviewViewer, fJavaTextTools);
     fPreviewViewer.setEditable(false);
     String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$
     IDocument document = new Document(content);
-//    fJavaTextTools.setupJavaDocumentPartitioner(document, ".php", null); //IJavaPartitions.JAVA_PARTITIONING);
+    //    fJavaTextTools.setupJavaDocumentPartitioner(document, ".php", null); //IJavaPartitions.JAVA_PARTITIONING);
     fJavaTextTools.setupJavaDocumentPartitioner(document, IPHPPartitions.PHP_PARTITIONING);
     fPreviewViewer.setDocument(document);
     return fPreviewViewer.getControl();
@@ -925,46 +754,24 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     GridLayout layout = new GridLayout();
     layout.numColumns = 2;
     appearanceComposite.setLayout(layout);
-    String label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
-    addTextField(appearanceComposite, label,
-        PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.printMarginColumn"); //$NON-NLS-1$
-    addTextField(
-        appearanceComposite,
-        label,
-        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN,
-        3, 0, true);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.showOverviewRuler"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.showLineNumbers"); //$NON-NLS-1$
-    addCheckBox(
-        appearanceComposite,
-        label,
-        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER,
-        0);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.highlightMatchingBrackets"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_MATCHING_BRACKETS, 0);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.highlightCurrentLine"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.markOccurrences"); //$NON-NLS-1$
+    String label = PreferencesMessages.getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
+    addTextField(appearanceComposite, label, PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.printMarginColumn"); //$NON-NLS-1$
+    addTextField(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 3, 0, true);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.showOverviewRuler"); //$NON-NLS-1$
+    addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.showLineNumbers"); //$NON-NLS-1$
+    addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.highlightMatchingBrackets"); //$NON-NLS-1$
+    addCheckBox(appearanceComposite, label, PreferenceConstants.EDITOR_MATCHING_BRACKETS, 0);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.highlightCurrentLine"); //$NON-NLS-1$
+    addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, 0);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$
+    addCheckBox(appearanceComposite, label, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN, 0);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.markOccurrences"); //$NON-NLS-1$
     //         Button master= addCheckBox(appearanceComposite, label,
     // PreferenceConstants.EDITOR_MARK_OCCURRENCES, 0); //$NON-NLS-1$
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.stickyOccurrences"); //$NON-NLS-1$
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.stickyOccurrences"); //$NON-NLS-1$
     //         fStickyOccurrencesButton= addCheckBox(appearanceComposite, label,
     // PreferenceConstants.EDITOR_STICKY_OCCURRENCES, 0); //$NON-NLS-1$
     //         createDependency(master, fStickyOccurrencesButton);
@@ -974,8 +781,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     gd.heightHint = convertHeightInCharsToPixels(1) / 2;
     l.setLayoutData(gd);
     l = new Label(appearanceComposite, SWT.LEFT);
-    l.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.appearanceOptions")); //$NON-NLS-1$
+    l.setText(PreferencesMessages.getString("JavaEditorPreferencePage.appearanceOptions")); //$NON-NLS-1$
     gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
     gd.horizontalSpan = 2;
     l.setLayoutData(gd);
@@ -988,10 +794,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
     gd.horizontalSpan = 2;
     editorComposite.setLayoutData(gd);
-    fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
-        | SWT.BORDER);
-    gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING
-        | GridData.FILL_HORIZONTAL);
+    fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER);
+    gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
     gd.heightHint = convertHeightInCharsToPixels(8);
     fAppearanceColorList.setLayoutData(gd);
     Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
@@ -1028,8 +832,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
       public void widgetSelected(SelectionEvent e) {
         int i = fAppearanceColorList.getSelectionIndex();
         String key = fAppearanceColorListModel[i][1];
-        PreferenceConverter.setValue(fOverlayStore, key, fAppearanceColorEditor
-            .getColorValue());
+        PreferenceConverter.setValue(fOverlayStore, key, fAppearanceColorEditor.getColorValue());
       }
     });
     return appearanceComposite;
@@ -1221,8 +1024,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
   //    });
   //    return composite;
   //  }
-  private String[][] createAnnotationTypeListModel(
-      MarkerAnnotationPreferences preferences) {
+  private String[][] createAnnotationTypeListModel(MarkerAnnotationPreferences preferences) {
     ArrayList listModelItems = new ArrayList();
     SortedSet sortedPreferences = new TreeSet(new Comparator() {
       /*
@@ -1235,19 +1037,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements
           return 1;
         AnnotationPreference a1 = (AnnotationPreference) o1;
         AnnotationPreference a2 = (AnnotationPreference) o2;
-        return Collator.getInstance().compare(a1.getPreferenceLabel(),
-            a2.getPreferenceLabel());
+        return Collator.getInstance().compare(a1.getPreferenceLabel(), a2.getPreferenceLabel());
       }
     });
     sortedPreferences.addAll(preferences.getAnnotationPreferences());
     Iterator e = sortedPreferences.iterator();
     while (e.hasNext()) {
       AnnotationPreference info = (AnnotationPreference) e.next();
-      listModelItems.add(new String[] { info.getPreferenceLabel(),
-          info.getColorPreferenceKey(), info.getTextPreferenceKey(),
-          info.getOverviewRulerPreferenceKey(),
-          info.getHighlightPreferenceKey(),
-          info.getVerticalRulerPreferenceKey(),
+      listModelItems.add(new String[] { info.getPreferenceLabel(), info.getColorPreferenceKey(), info.getTextPreferenceKey(),
+          info.getOverviewRulerPreferenceKey(), info.getHighlightPreferenceKey(), info.getVerticalRulerPreferenceKey(),
           info.getTextStylePreferenceKey() });
     }
     String[][] items = new String[listModelItems.size()][];
@@ -1261,81 +1059,75 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     layout.numColumns = 1;
     composite.setLayout(layout);
     String label;
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.overwriteMode");
-//    //$NON-NLS-1$
-//    addCheckBox(composite, label,
-//        PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE, 1);
-//    addFiller(composite);
-//
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.smartHomeEnd");
-//    //$NON-NLS-1$
-//    addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
-//
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.subWordNavigation");
-//    //$NON-NLS-1$
-//    addCheckBox(composite, label,
-//        PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, 1);
-//    addFiller(composite);
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.overwriteMode");
+    //    //$NON-NLS-1$
+    //    addCheckBox(composite, label,
+    //        PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE, 1);
+    //    addFiller(composite);
+    //
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.smartHomeEnd");
+    //    //$NON-NLS-1$
+    //    addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
+    //
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.subWordNavigation");
+    //    //$NON-NLS-1$
+    //    addCheckBox(composite, label,
+    //        PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, 1);
+    //    addFiller(composite);
     Group group = new Group(composite, SWT.NONE);
     layout = new GridLayout();
     layout.numColumns = 2;
     group.setLayout(layout);
-    group.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.typing.description")); //$NON-NLS-1$
+    group.setText(PreferencesMessages.getString("JavaEditorPreferencePage.typing.description")); //$NON-NLS-1$
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.wrapStrings");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.wrapStrings");
     //$NON-NLS-1$
-    Button button = addCheckBox(group, label,
-        PreferenceConstants.EDITOR_WRAP_STRINGS, 1);
+    Button button = addCheckBox(group, label, PreferenceConstants.EDITOR_WRAP_STRINGS, 1);
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.escapeStrings");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.escapeStrings");
     //$NON-NLS-1$
-    fEscapeStringsButton = addCheckBox(group, label,
-        PreferenceConstants.EDITOR_ESCAPE_STRINGS, 1);
+    fEscapeStringsButton = addCheckBox(group, label, PreferenceConstants.EDITOR_ESCAPE_STRINGS, 1);
     createDependency(button, fEscapeStringsButton);
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.smartPaste");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.smartPaste");
     //$NON-NLS-1$
     addCheckBox(group, label, PreferenceConstants.EDITOR_SMART_PASTE, 1);
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.insertSpaceForTabs");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs");
     //$NON-NLS-1$
     addCheckBox(group, label, PreferenceConstants.EDITOR_SPACES_FOR_TABS, 1);
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.closeStrings");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.closeStringsDQ");
+    //$NON-NLS-1$
+    addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP, 1);
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.closeStringsSQ");
     //$NON-NLS-1$
-    addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP, 1);
+    addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP, 1);
 
-    label = PreferencesMessages
-        .getString("JavaEditorPreferencePage.closeBrackets");
+    label = PreferencesMessages.getString("JavaEditorPreferencePage.closeBrackets");
     //$NON-NLS-1$
     addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP, 1);
 
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.closeBraces");
-//    //$NON-NLS-1$
-//    addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 1);
-
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.closeJavaDocs");
-//    //$NON-NLS-1$
-//    button = addCheckBox(group, label,
-//        PreferenceConstants.EDITOR_CLOSE_JAVADOCS, 1);
-//
-//    label = PreferencesMessages
-//        .getString("JavaEditorPreferencePage.addJavaDocTags");
-//    //$NON-NLS-1$
-//    fAddJavaDocTagsButton = addCheckBox(group, label,
-//        PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, 1);
-//    createDependency(button, fAddJavaDocTagsButton);
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.closeBraces");
+    //    //$NON-NLS-1$
+    //    addCheckBox(group, label, PreferenceConstants.EDITOR_CLOSE_BRACES, 1);
+
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.closeJavaDocs");
+    //    //$NON-NLS-1$
+    //    button = addCheckBox(group, label,
+    //        PreferenceConstants.EDITOR_CLOSE_JAVADOCS, 1);
+    //
+    //    label = PreferencesMessages
+    //        .getString("JavaEditorPreferencePage.addJavaDocTags");
+    //    //$NON-NLS-1$
+    //    fAddJavaDocTagsButton = addCheckBox(group, label,
+    //        PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, 1);
+    //    createDependency(button, fAddJavaDocTagsButton);
     return composite;
   }
 
@@ -1366,8 +1158,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
   }
 
   private void addCompletionRadioButtons(Composite contentAssistComposite) {
-    Composite completionComposite = new Composite(contentAssistComposite,
-        SWT.NONE);
+    Composite completionComposite = new Composite(contentAssistComposite, SWT.NONE);
     GridData ccgd = new GridData();
     ccgd.horizontalSpan = 2;
     completionComposite.setLayoutData(ccgd);
@@ -1525,8 +1316,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
    * Computes the state mask for the given modifier string.
    * 
    * @param modifiers
-   *          the string with the modifiers, separated by '+', '-', ';', ',' or
-   *          '.'
+   *          the string with the modifiers, separated by '+', '-', ';', ',' or '.'
    * @return the state mask or -1 if the input is invalid
    */
   private int computeStateMask(String modifiers) {
@@ -1535,11 +1325,9 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     if (modifiers.length() == 0)
       return SWT.NONE;
     int stateMask = 0;
-    StringTokenizer modifierTokenizer = new StringTokenizer(modifiers,
-        ",;.:+-* "); //$NON-NLS-1$
+    StringTokenizer modifierTokenizer = new StringTokenizer(modifiers, ",;.:+-* "); //$NON-NLS-1$
     while (modifierTokenizer.hasMoreTokens()) {
-      int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer
-          .nextToken());
+      int modifier = EditorUtility.findLocalizedModifier(modifierTokenizer.nextToken());
       if (modifier == 0 || (stateMask & modifier) == modifier)
         return -1;
       stateMask = stateMask | modifier;
@@ -1559,12 +1347,10 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     folder.setLayout(new TabFolderLayout());
     folder.setLayoutData(new GridData(GridData.FILL_BOTH));
     TabItem item = new TabItem(folder, SWT.NONE);
-    item.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.general")); //$NON-NLS-1$
+    item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.general")); //$NON-NLS-1$
     item.setControl(createAppearancePage(folder));
     item = new TabItem(folder, SWT.NONE);
-    item.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.colors")); //$NON-NLS-1$
+    item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.colors")); //$NON-NLS-1$
     item.setControl(createSyntaxPage(folder));
 
     //    item = new TabItem(folder, SWT.NONE);
@@ -1573,25 +1359,21 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     // //$NON-NLS-1$
     //    item.setControl(createAnnotationsPage(folder));
     item = new TabItem(folder, SWT.NONE);
-    item.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.typing.tabTitle"));
+    item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.typing.tabTitle"));
     //$NON-NLS-1$
     item.setControl(createTypingPage(folder));
 
     item = new TabItem(folder, SWT.NONE);
-    item.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.hoverTab.title"));
+    item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.hoverTab.title"));
     //$NON-NLS-1$
-    fJavaEditorHoverConfigurationBlock = new JavaEditorHoverConfigurationBlock(
-        this, fOverlayStore);
+    fJavaEditorHoverConfigurationBlock = new JavaEditorHoverConfigurationBlock(this, fOverlayStore);
     item.setControl(fJavaEditorHoverConfigurationBlock.createControl(folder));
     //                 item= new TabItem(folder, SWT.NONE);
     //                 item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.navigationTab.title"));
     // //$NON-NLS-1$
     //                 item.setControl(createNavigationPage(folder));
     item = new TabItem(folder, SWT.NONE);
-    item.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.folding.title")); //$NON-NLS-1$
+    item.setText(PreferencesMessages.getString("JavaEditorPreferencePage.folding.title")); //$NON-NLS-1$
     item.setControl(fFoldingConfigurationBlock.createControl(folder));
 
     initialize();
@@ -1665,19 +1447,16 @@ public class JavaEditorPreferencePage extends PreferencePage implements
       String key = (String) fTextFields.get(t);
       t.setText(fOverlayStore.getString(key));
     }
-    RGB rgb = PreferenceConverter.getColor(fOverlayStore,
-        PreferenceConstants.EDITOR_BACKGROUND_COLOR);
+    RGB rgb = PreferenceConverter.getColor(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR);
     fBackgroundColorEditor.setColorValue(rgb);
-    boolean default_ = fOverlayStore
-        .getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
+    boolean default_ = fOverlayStore.getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
     fBackgroundDefaultRadioButton.setSelection(default_);
     fBackgroundCustomRadioButton.setSelection(!default_);
     fBackgroundColorButton.setEnabled(!default_);
-//    boolean closeJavaDocs = fOverlayStore
-//        .getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
-//    fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
-    fEscapeStringsButton.setEnabled(fOverlayStore
-        .getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS));
+    //    boolean closeJavaDocs = fOverlayStore
+    //        .getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
+    //    fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
+    fEscapeStringsButton.setEnabled(fOverlayStore.getBoolean(PreferenceConstants.EDITOR_WRAP_STRINGS));
     //         boolean fillMethodArguments=
     // fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
     //         fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
@@ -1694,23 +1473,15 @@ public class JavaEditorPreferencePage extends PreferencePage implements
   }
 
   private void initializeDefaultColors() {
-    if (!getPreferenceStore().contains(
-        PreferenceConstants.EDITOR_BACKGROUND_COLOR)) {
-      RGB rgb = getControl().getDisplay().getSystemColor(
-          SWT.COLOR_LIST_BACKGROUND).getRGB();
-      PreferenceConverter.setDefault(fOverlayStore,
-          PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
-      PreferenceConverter.setDefault(getPreferenceStore(),
-          PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
+    if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_BACKGROUND_COLOR)) {
+      RGB rgb = getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
+      PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
+      PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
     }
-    if (!getPreferenceStore().contains(
-        PreferenceConstants.EDITOR_FOREGROUND_COLOR)) {
-      RGB rgb = getControl().getDisplay().getSystemColor(
-          SWT.COLOR_LIST_FOREGROUND).getRGB();
-      PreferenceConverter.setDefault(fOverlayStore,
-          PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
-      PreferenceConverter.setDefault(getPreferenceStore(),
-          PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
+    if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_FOREGROUND_COLOR)) {
+      RGB rgb = getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
+      PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
+      PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
     }
   }
 
@@ -1774,8 +1545,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     super.dispose();
   }
 
-  private Button addCheckBox(Composite parent, String label, String key,
-      int indentation) {
+  private Button addCheckBox(Composite parent, String label, String key, int indentation) {
     Button checkBox = new Button(parent, SWT.CHECK);
     checkBox.setText(label);
     GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
@@ -1787,10 +1557,8 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     return checkBox;
   }
 
-  private Text addTextField(Composite composite, String label, String key,
-      int textLimit, int indentation, boolean isNumber) {
-    return getTextControl(addLabelledTextField(composite, label, key,
-        textLimit, indentation, isNumber));
+  private Text addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
+    return getTextControl(addLabelledTextField(composite, label, key, textLimit, indentation, isNumber));
   }
 
   private static Label getLabelControl(Control[] labelledTextField) {
@@ -1802,13 +1570,11 @@ public class JavaEditorPreferencePage extends PreferencePage implements
   }
 
   /**
-   * Returns an array of size 2: - first element is of type <code>Label</code>-
-   * second element is of type <code>Text</code> Use
-   * <code>getLabelControl</code> and <code>getTextControl</code> to get the
-   * 2 controls.
+   * Returns an array of size 2: - first element is of type <code>Label</code>- second element is of type <code>Text</code> Use
+   * <code>getLabelControl</code> and <code>getTextControl</code> to get the 2 controls.
    */
-  private Control[] addLabelledTextField(Composite composite, String label,
-      String key, int textLimit, int indentation, boolean isNumber) {
+  private Control[] addLabelledTextField(Composite composite, String label, String key, int textLimit, int indentation,
+      boolean isNumber) {
     Label labelControl = new Label(composite, SWT.NONE);
     labelControl.setText(label);
     GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
@@ -1835,8 +1601,7 @@ public class JavaEditorPreferencePage extends PreferencePage implements
     StringBuffer buffer = new StringBuffer(512);
     BufferedReader reader = null;
     try {
-      reader = new BufferedReader(new InputStreamReader(getClass()
-          .getResourceAsStream(filename)));
+      reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
       while ((line = reader.readLine()) != null) {
         buffer.append(line);
         buffer.append(separator);
@@ -1865,17 +1630,14 @@ public class JavaEditorPreferencePage extends PreferencePage implements
   private IStatus validatePositiveNumber(String number) {
     StatusInfo status = new StatusInfo();
     if (number.length() == 0) {
-      status.setError(PreferencesMessages
-          .getString("JavaEditorPreferencePage.empty_input")); //$NON-NLS-1$
+      status.setError(PreferencesMessages.getString("JavaEditorPreferencePage.empty_input")); //$NON-NLS-1$
     } else {
       try {
         int value = Integer.parseInt(number);
         if (value < 0)
-          status.setError(PreferencesMessages.getFormattedString(
-              "JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
+          status.setError(PreferencesMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
       } catch (NumberFormatException e) {
-        status.setError(PreferencesMessages.getFormattedString(
-            "JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
+        status.setError(PreferencesMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
       }
     }
     return status;
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/PHPEditorPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/PHPEditorPreferencePage.java
deleted file mode 100644 (file)
index 72ab748..0000000
+++ /dev/null
@@ -1,1964 +0,0 @@
-/**********************************************************************
- Copyright (c) 2000, 2002 IBM Corp. and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Common Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/cpl-v10.html
-
- Contributors:
- IBM Corporation - Initial implementation
- **********************************************************************/
-package net.sourceforge.phpdt.internal.ui.preferences;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import net.sourceforge.phpdt.core.JavaCore;
-import net.sourceforge.phpdt.internal.ui.PHPUIMessages;
-import net.sourceforge.phpdt.internal.ui.dialogs.StatusInfo;
-import net.sourceforge.phpdt.internal.ui.dialogs.StatusUtil;
-import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
-import net.sourceforge.phpdt.internal.ui.util.TabFolderLayout;
-import net.sourceforge.phpdt.ui.PreferenceConstants;
-import net.sourceforge.phpdt.ui.text.JavaTextTools;
-import net.sourceforge.phpdt.ui.text.PHPSourceViewerConfiguration;
-import net.sourceforge.phpeclipse.IPreferenceConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.preferences.ColorEditor;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.texteditor.AnnotationPreference;
-import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
-import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
-/*
- * The page for setting the editor options.
- */
-public class PHPEditorPreferencePage extends PreferencePage
-    implements
-      IWorkbenchPreferencePage {
-  private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX;
-  private static final String COMPILER_TASK_TAGS = JavaCore.COMPILER_TASK_TAGS;
-//    public final OverlayPreferenceStore.OverlayKey[] fKeys =
-//      new OverlayPreferenceStore.OverlayKey[] {
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_FOREGROUND_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_BACKGROUND_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
-  // PreferenceConstants.EDITOR_TAB_WIDTH),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVA_TAG_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVA_TAG_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PHP_TYPE_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PHP_TYPE_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_STRING_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_STRING_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_MATCHING_BRACKETS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CURRENT_LINE_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CURRENT_LINE),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PRINT_MARGIN_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
-  // PreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PRINT_MARGIN),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_FIND_SCOPE_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_LINKED_POSITION_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_LINK_COLOR),
-  //// new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_PROBLEM_INDICATION_COLOR),
-  //// new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_PROBLEM_INDICATION),
-  //// new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_WARNING_INDICATION_COLOR),
-  //// new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_WARNING_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_TASK_INDICATION_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_TASK_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_BOOKMARK_INDICATION_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_BOOKMARK_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.STRING,
-  //        PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_UNKNOWN_INDICATION_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_UNKNOWN_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_ERROR_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_WARNING_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_TASK_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_BOOKMARK_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(
-  //        OverlayPreferenceStore.BOOLEAN,
-  //        PreferenceConstants.EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CORRECTION_INDICATION),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_OVERVIEW_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_LINE_NUMBER_RULER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SPACES_FOR_TABS),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_AUTOACTIVATION),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
-//   PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_AUTOINSERT),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-//   PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND),
-//        new OverlayPreferenceStore.OverlayKey(
-//          OverlayPreferenceStore.STRING,
-//          PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA),
-//        new OverlayPreferenceStore.OverlayKey(
-//          OverlayPreferenceStore.STRING,
-//          PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC),
-//        new OverlayPreferenceStore.OverlayKey(
-//          OverlayPreferenceStore.STRING,
-//          PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_HTML),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_ORDER_PROPOSALS),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_CASE_SENSITIVITY),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_ADDIMPORT),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_INSERT_COMPLETION),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES),
-//        new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//   PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SMART_PASTE),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // IPreferenceConstants.PHP_USERDEF_XMLFILE),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_BRACES),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_JAVADOCS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_WRAP_STRINGS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_FORMAT_JAVADOCS),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_SMART_HOME_END),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_STRINGS_HTML),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-  // PreferenceConstants.EDITOR_CLOSE_BRACKETS_HTML),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_DEFAULT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_NONE_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CTRL_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_SHIFT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CTRL_SHIFT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CTRL_ALT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CTRL_ALT_SHIFT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_CTRL_SHIFT_HOVER),
-  //      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-  // PreferenceConstants.EDITOR_ALT_SHIFT_HOVER),
-//        };
-  /** The keys of the overlay store. */
-  public final OverlayPreferenceStore.OverlayKey[] fKeys;
-  private final String[][] fSyntaxColorListModel = new String[][]{
-      {PHPUIMessages.getString("PHPEditorPreferencePage.multiLineComment"),
-          PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.singleLineComment"),
-          PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.tags"),
-          PreferenceConstants.EDITOR_PHP_TAG_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.keywords"),
-          PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.functionNames"),
-          PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.variables"),
-          PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.constants"),
-          PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.types"),
-          PreferenceConstants.EDITOR_PHP_TYPE_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.strings"),
-          PreferenceConstants.EDITOR_STRING_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.others"),
-          PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.phpDocKeywords"),
-          PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.phpDocHtmlTags"),
-          PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.phpDocLinks"),
-          PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.phpDocOthers"),
-          PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR} //$NON-NLS-1$
-  };
-  private final String[][] fAppearanceColorListModel = new String[][]{
-      {
-          PHPUIMessages
-              .getString("PHPEditorPreferencePage.lineNumberForegroundColor"),
-          PreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR},
-      //$NON-NLS-1$
-      {
-          PHPUIMessages
-              .getString("PHPEditorPreferencePage.matchingBracketsHighlightColor2"),
-          PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR},
-      //$NON-NLS-1$
-      {
-          PHPUIMessages
-              .getString("PHPEditorPreferencePage.currentLineHighlighColor"),
-          PreferenceConstants.EDITOR_CURRENT_LINE_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.printMarginColor2"),
-          PreferenceConstants.EDITOR_PRINT_MARGIN_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.findScopeColor2"),
-          PreferenceConstants.EDITOR_FIND_SCOPE_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.linkedPositionColor2"),
-          PreferenceConstants.EDITOR_LINKED_POSITION_COLOR},
-      //$NON-NLS-1$
-      {PHPUIMessages.getString("PHPEditorPreferencePage.linkColor2"),
-          PreferenceConstants.EDITOR_LINK_COLOR}, //$NON-NLS-1$
-  };
-  //  private final String[][] fProblemIndicationColorListModel =
-  //    new String[][] {
-  //      {
-  //        "Errors",
-  //        PreferenceConstants.EDITOR_PROBLEM_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_PROBLEM_INDICATION,
-  //        PreferenceConstants.EDITOR_ERROR_INDICATION_IN_OVERVIEW_RULER },
-  //      {
-  //      "Warnings",
-  //        PreferenceConstants.EDITOR_WARNING_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_WARNING_INDICATION,
-  //        PreferenceConstants.EDITOR_WARNING_INDICATION_IN_OVERVIEW_RULER },
-  //        {
-  //      "Tasks",
-  //        PreferenceConstants.EDITOR_TASK_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_TASK_INDICATION,
-  //        PreferenceConstants.EDITOR_TASK_INDICATION_IN_OVERVIEW_RULER },
-  //        {
-  //      "Search Results",
-  //        PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION,
-  //        PreferenceConstants.EDITOR_SEARCH_RESULT_INDICATION_IN_OVERVIEW_RULER },
-  //        {
-  //      "Bookmarks",
-  //        PreferenceConstants.EDITOR_BOOKMARK_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_BOOKMARK_INDICATION,
-  //        PreferenceConstants.EDITOR_BOOKMARK_INDICATION_IN_OVERVIEW_RULER },
-  //        {
-  //      "Others",
-  //        PreferenceConstants.EDITOR_UNKNOWN_INDICATION_COLOR,
-  //        PreferenceConstants.EDITOR_UNKNOWN_INDICATION,
-  //        PreferenceConstants.EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER }
-  //  };
-  private final String[][] fAnnotationColorListModel;
-  private final String[][] fAnnotationDecorationListModel = new String[][]{
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.AnnotationDecoration.NONE"),
-          AnnotationPreference.STYLE_NONE},
-      //$NON-NLS-1$
-//      {
-//          PreferencesMessages
-//              .getString("JavaEditorPreferencePage.AnnotationDecoration.SQUIGGLIES"),
-//          AnnotationPreference.STYLE_SQUIGGLIES},
-      //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.AnnotationDecoration.UNDERLINE"),
-          AnnotationPreference.STYLE_UNDERLINE},
-      //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.AnnotationDecoration.BOX"),
-          AnnotationPreference.STYLE_BOX},
-      //$NON-NLS-1$
-      {
-          PreferencesMessages
-              .getString("JavaEditorPreferencePage.AnnotationDecoration.IBEAM"),
-          AnnotationPreference.STYLE_IBEAM} //$NON-NLS-1$
-  };
-  private OverlayPreferenceStore fOverlayStore;
-  private JavaTextTools fJavaTextTools;
-  //   private JavaEditorHoverConfigurationBlock
-  // fJavaEditorHoverConfigurationBlock;
-  private Map fColorButtons = new HashMap();
-  private SelectionListener fColorButtonListener = new SelectionListener() {
-    public void widgetDefaultSelected(SelectionEvent e) {
-    }
-    public void widgetSelected(SelectionEvent e) {
-      ColorEditor editor = (ColorEditor) e.widget.getData();
-      PreferenceConverter.setValue(fOverlayStore, (String) fColorButtons
-          .get(editor), editor.getColorValue());
-    }
-  };
-  private Map fCheckBoxes = new HashMap();
-  private SelectionListener fCheckBoxListener = new SelectionListener() {
-    public void widgetDefaultSelected(SelectionEvent e) {
-    }
-    public void widgetSelected(SelectionEvent e) {
-      Button button = (Button) e.widget;
-      fOverlayStore.setValue((String) fCheckBoxes.get(button), button
-          .getSelection());
-    }
-  };
-  private Map fTextFields = new HashMap();
-  private ModifyListener fTextFieldListener = new ModifyListener() {
-    public void modifyText(ModifyEvent e) {
-      Text text = (Text) e.widget;
-      fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
-    }
-  };
-  private ArrayList fNumberFields = new ArrayList();
-  private ModifyListener fNumberFieldListener = new ModifyListener() {
-    public void modifyText(ModifyEvent e) {
-      numberFieldChanged((Text) e.widget);
-    }
-  };
-  private WorkbenchChainedTextFontFieldEditor fFontEditor;
-  private List fSyntaxColorList;
-  private List fAppearanceColorList;
-  private List fAnnotationList;
-  private ColorEditor fSyntaxForegroundColorEditor;
-  private ColorEditor fAppearanceForegroundColorEditor;
-  private ColorEditor fAnnotationForegroundColorEditor;
-  private ColorEditor fBackgroundColorEditor;
-  private Button fBackgroundDefaultRadioButton;
-  private Button fBackgroundCustomRadioButton;
-  private Button fBackgroundColorButton;
-  private Button fBoldCheckBox;
-  //private Button fAddJavaDocTagsButton;
-  // private Button fGuessMethodArgumentsButton;
-  private SourceViewer fPreviewViewer;
-  private Color fBackgroundColor;
-  private Control fAutoInsertDelayText;
-  private Control fAutoInsertJavaTriggerText;
-  private Control fAutoInsertJavaDocTriggerText;
-  private Control fAutoInsertHTMLTriggerText;
-  private Button fShowInTextCheckBox;
-  private Button fShowInOverviewRulerCheckBox;
-  private Combo fDecorationStyleCombo;
-  private Button fHighlightInTextCheckBox;
-  private Button fShowInVerticalRulerCheckBox;
-  // private FileFieldEditor fUserDefinedPHPSyntaxFileFFE;
-  public PHPEditorPreferencePage() {
-    setDescription(PHPUIMessages
-        .getString("PHPEditorPreferencePage.description")); //$NON-NLS-1$
-    setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
-    MarkerAnnotationPreferences markerAnnotationPreferences = new MarkerAnnotationPreferences();
-    fKeys = createOverlayStoreKeys(markerAnnotationPreferences);
-    fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), fKeys);
-    fAnnotationColorListModel = createAnnotationTypeListModel(markerAnnotationPreferences);
-  }
-  private OverlayPreferenceStore.OverlayKey[] createOverlayStoreKeys(
-      MarkerAnnotationPreferences preferences) {
-    ArrayList overlayKeys = new ArrayList();
-    Iterator e = preferences.getAnnotationPreferences().iterator();
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_PHP_FUNCTIONNAME_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_PHP_VARIABLE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_PHP_VARIABLE_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_PHP_CONSTANT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_PHP_CONSTANT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_PHP_TYPE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_PHP_TYPE_BOLD));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            IPreferenceConstants.PHP_USERDEF_XMLFILE));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_STRINGS_HTML));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_BRACKETS_HTML));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_FOREGROUND_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_BACKGROUND_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.INT, PreferenceConstants.EDITOR_TAB_WIDTH));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING,
-            PreferenceConstants.EDITOR_STRING_COLOR));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_STRING_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // PreferenceConstants.EDITOR_TASK_TAG_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_TASK_TAG_BOLD));
-    // 
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD));
-    // 
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // PreferenceConstants.EDITOR_JAVA_OPERATOR_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_JAVA_OPERATOR_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_MATCHING_BRACKETS));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE));
-    // 
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN));
-    //
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_MARK_OCCURRENCES));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_STICKY_OCCURRENCES));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_FIND_SCOPE_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_LINK_COLOR));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CORRECTION_INDICATION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // ExtendedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_SPACES_FOR_TABS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.INT,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_AUTOINSERT));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING, 
-        PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_ORDER_PROPOSALS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_CASE_SENSITIVITY));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_ADDIMPORT));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_INSERT_COMPLETION));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_SMART_PASTE));
-//     overlayKeys.add(new
-//     OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//     PreferenceConstants.EDITOR_CLOSE_STRINGS));
-//     overlayKeys.add(new
-//     OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-//     PreferenceConstants.EDITOR_CLOSE_BRACKETS));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_CLOSE_BRACES));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_CLOSE_JAVADOCS));
-    overlayKeys
-        .add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN,
-            PreferenceConstants.EDITOR_WRAP_STRINGS));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_ESCAPE_STRINGS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_SMART_HOME_END));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE));
-    // overlayKeys.add(new
-    // OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
-    // PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.BOOLEAN,
-        PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER));
-    overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-        OverlayPreferenceStore.STRING,
-        PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK));
-    while (e.hasNext()) {
-      AnnotationPreference info = (AnnotationPreference) e.next();
-      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-          OverlayPreferenceStore.STRING, info.getColorPreferenceKey()));
-      overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-          OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey()));
-      if (info.getHighlightPreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey()));
-      overlayKeys
-          .add(new OverlayPreferenceStore.OverlayKey(
-              OverlayPreferenceStore.BOOLEAN, info
-                  .getOverviewRulerPreferenceKey()));
-      if (info.getVerticalRulerPreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.BOOLEAN, info
-                .getVerticalRulerPreferenceKey()));
-      if (info.getTextStylePreferenceKey() != null)
-        overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
-            OverlayPreferenceStore.STRING, info.getTextStylePreferenceKey()));
-    }
-    OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys
-        .size()];
-    overlayKeys.toArray(keys);
-    return keys;
-  }
-  /*
-   * @see IWorkbenchPreferencePage#init()
-   */
-  public void init(IWorkbench workbench) {
-  }
-  /*
-   * @see PreferencePage#createControl(Composite)
-   */
-  public void createControl(Composite parent) {
-    super.createControl(parent);
-    // WorkbenchHelp.setHelp(getControl(),
-    // IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
-  }
-  private void handleSyntaxColorListSelection() {
-    int i = fSyntaxColorList.getSelectionIndex();
-    String key = fSyntaxColorListModel[i][1];
-    RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
-    fSyntaxForegroundColorEditor.setColorValue(rgb);
-    fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD));
-  }
-  private void handleAppearanceColorListSelection() {
-    int i = fAppearanceColorList.getSelectionIndex();
-    String key = fAppearanceColorListModel[i][1];
-    RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
-    fAppearanceForegroundColorEditor.setColorValue(rgb);
-  }
-  //  private void handleProblemIndicationColorListSelection() {
-  //    int i = fProblemIndicationList.getSelectionIndex();
-  //
-  //    String key = fProblemIndicationColorListModel[i][1];
-  //    RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
-  //    fProblemIndicationForegroundColorEditor.setColorValue(rgb);
-  //
-  //    key = fProblemIndicationColorListModel[i][2];
-  //    fShowInTextCheckBox.setSelection(fOverlayStore.getBoolean(key));
-  //
-  //    key = fProblemIndicationColorListModel[i][3];
-  //    fShowInOverviewRulerCheckBox.setSelection(fOverlayStore.getBoolean(key));
-  //  }
-  private void handleAnnotationListSelection() {
-    int i = fAnnotationList.getSelectionIndex();
-    String key = fAnnotationColorListModel[i][1];
-    RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
-    fAnnotationForegroundColorEditor.setColorValue(rgb);
-    key = fAnnotationColorListModel[i][2];
-    boolean showInText = fOverlayStore.getBoolean(key);
-    fShowInTextCheckBox.setSelection(showInText);
-    key = fAnnotationColorListModel[i][6];
-    if (key != null) {
-      fDecorationStyleCombo.setEnabled(showInText);
-      for (int j = 0; j < fAnnotationDecorationListModel.length; j++) {
-        String value = fOverlayStore.getString(key);
-        if (fAnnotationDecorationListModel[j][1].equals(value)) {
-          fDecorationStyleCombo.setText(fAnnotationDecorationListModel[j][0]);
-          break;
-        }
-      }
-    } else {
-      fDecorationStyleCombo.setEnabled(false);
-      fDecorationStyleCombo.setText(fAnnotationDecorationListModel[1][0]); // set
-                                                                           // selection
-                                                                           // to
-                                                                           // squigglies
-                                                                           // if
-                                                                           // the
-                                                                           // key
-                                                                           // is
-                                                                           // not
-                                                                           // there
-                                                                           // (legacy
-                                                                           // support)
-    }
-    key = fAnnotationColorListModel[i][3];
-    fShowInOverviewRulerCheckBox.setSelection(fOverlayStore.getBoolean(key));
-    key = fAnnotationColorListModel[i][4];
-    if (key != null) {
-      fHighlightInTextCheckBox.setSelection(fOverlayStore.getBoolean(key));
-      fHighlightInTextCheckBox.setEnabled(true);
-    } else
-      fHighlightInTextCheckBox.setEnabled(false);
-    key = fAnnotationColorListModel[i][5];
-    if (key != null) {
-      fShowInVerticalRulerCheckBox.setSelection(fOverlayStore.getBoolean(key));
-      fShowInVerticalRulerCheckBox.setEnabled(true);
-    } else {
-      fShowInVerticalRulerCheckBox.setSelection(true);
-      fShowInVerticalRulerCheckBox.setEnabled(false);
-    }
-  }
-  private Control createSyntaxPage(Composite parent) {
-    Composite colorComposite = new Composite(parent, SWT.NULL);
-    colorComposite.setLayout(new GridLayout());
-    Group backgroundComposite = new Group(colorComposite, SWT.SHADOW_ETCHED_IN);
-    backgroundComposite.setLayout(new RowLayout());
-    backgroundComposite.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.backgroundColor")); //$NON-NLS-1$
-    SelectionListener backgroundSelectionListener = new SelectionListener() {
-      public void widgetSelected(SelectionEvent e) {
-        boolean custom = fBackgroundCustomRadioButton.getSelection();
-        fBackgroundColorButton.setEnabled(custom);
-        fOverlayStore.setValue(
-            PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR, !custom);
-      }
-      public void widgetDefaultSelected(SelectionEvent e) {
-      }
-    };
-    fBackgroundDefaultRadioButton = new Button(backgroundComposite, SWT.RADIO
-        | SWT.LEFT);
-    fBackgroundDefaultRadioButton.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.systemDefault")); //$NON-NLS-1$
-    fBackgroundDefaultRadioButton
-        .addSelectionListener(backgroundSelectionListener);
-    fBackgroundCustomRadioButton = new Button(backgroundComposite, SWT.RADIO
-        | SWT.LEFT);
-    fBackgroundCustomRadioButton.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.custom")); //$NON-NLS-1$
-    fBackgroundCustomRadioButton
-        .addSelectionListener(backgroundSelectionListener);
-    fBackgroundColorEditor = new ColorEditor(backgroundComposite);
-    fBackgroundColorButton = fBackgroundColorEditor.getButton();
-    //    fUserDefinedPHPSyntaxFileFFE =
-    //      new FileFieldEditor(
-    //        IPreferenceConstants.PHP_USERDEF_XMLFILE,
-    //        PHPPreferencesMessages.getString("PHPEditorSyntaxPreferencePage.syntaxdialog"),
-    //        colorComposite);
-    //    fUserDefinedPHPSyntaxFileFFE.setPreferencePage(this);
-    //    fUserDefinedPHPSyntaxFileFFE.setPreferenceStore(getPreferenceStore());
-    //    fUserDefinedPHPSyntaxFileFFE.load();
-    Label label = new Label(colorComposite, SWT.LEFT);
-    label
-        .setText(PHPUIMessages.getString("PHPEditorPreferencePage.foreground")); //$NON-NLS-1$
-    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    Composite editorComposite = new Composite(colorComposite, SWT.NONE);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 2;
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    editorComposite.setLayout(layout);
-    GridData gd = new GridData(GridData.FILL_BOTH);
-    editorComposite.setLayoutData(gd);
-    fSyntaxColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
-        | SWT.BORDER);
-    gd = new GridData(GridData.FILL_BOTH);
-    gd.heightHint = convertHeightInCharsToPixels(5);
-    fSyntaxColorList.setLayoutData(gd);
-    Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
-    layout = new GridLayout();
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    layout.numColumns = 2;
-    stylesComposite.setLayout(layout);
-    stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-    label = new Label(stylesComposite, SWT.LEFT);
-    label.setText(PHPUIMessages.getString("PHPEditorPreferencePage.color")); //$NON-NLS-1$
-    gd = new GridData();
-    gd.horizontalAlignment = GridData.BEGINNING;
-    label.setLayoutData(gd);
-    fSyntaxForegroundColorEditor = new ColorEditor(stylesComposite);
-    Button foregroundColorButton = fSyntaxForegroundColorEditor.getButton();
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    foregroundColorButton.setLayoutData(gd);
-    fBoldCheckBox = new Button(stylesComposite, SWT.CHECK);
-    fBoldCheckBox.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.bold")); //$NON-NLS-1$
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    fBoldCheckBox.setLayoutData(gd);
-    label = new Label(colorComposite, SWT.LEFT);
-    label.setText(PHPUIMessages.getString("PHPEditorPreferencePage.preview")); //$NON-NLS-1$
-    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    Control previewer = createPreviewer(colorComposite);
-    gd = new GridData(GridData.FILL_BOTH);
-    gd.widthHint = convertWidthInCharsToPixels(20);
-    gd.heightHint = convertHeightInCharsToPixels(5);
-    previewer.setLayoutData(gd);
-    fSyntaxColorList.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        handleSyntaxColorListSelection();
-      }
-    });
-    foregroundColorButton.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fSyntaxColorList.getSelectionIndex();
-        String key = fSyntaxColorListModel[i][1];
-        PreferenceConverter.setValue(fOverlayStore, key,
-            fSyntaxForegroundColorEditor.getColorValue());
-      }
-    });
-    fBackgroundColorButton.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        PreferenceConverter.setValue(fOverlayStore,
-            PreferenceConstants.EDITOR_BACKGROUND_COLOR, fBackgroundColorEditor
-                .getColorValue());
-      }
-    });
-    fBoldCheckBox.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fSyntaxColorList.getSelectionIndex();
-        String key = fSyntaxColorListModel[i][1];
-        fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection());
-      }
-    });
-    return colorComposite;
-  }
-  private Control createPreviewer(Composite parent) {
-    Preferences coreStore = createTemporaryCorePreferenceStore();
-    fJavaTextTools = new JavaTextTools(fOverlayStore, coreStore, false);
-    fPreviewViewer = new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL
-        | SWT.BORDER);
-    fPreviewViewer.configure(new PHPSourceViewerConfiguration(fJavaTextTools,
-        null, IPHPPartitions.PHP_PARTITIONING));
-    fPreviewViewer.getTextWidget().setFont(
-        JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
-    fPreviewViewer.setEditable(false);
-    initializeViewerColors(fPreviewViewer);
-    String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$
-    IDocument document = new Document(content);
-    //  PHPEditorEnvironment pe;
-    IDocumentPartitioner partitioner = fJavaTextTools
-        .createDocumentPartitioner();
-    partitioner.connect(document);
-    document.setDocumentPartitioner(partitioner);
-    fPreviewViewer.setDocument(document);
-    fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() {
-      public void propertyChange(PropertyChangeEvent event) {
-        String p = event.getProperty();
-        if (p.equals(PreferenceConstants.EDITOR_BACKGROUND_COLOR)
-            || p.equals(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR)) {
-          initializeViewerColors(fPreviewViewer);
-        }
-        fPreviewViewer.invalidateTextPresentation();
-      }
-    });
-    return fPreviewViewer.getControl();
-  }
-  private Preferences createTemporaryCorePreferenceStore() {
-    Preferences result = new Preferences();
-    result.setValue(COMPILER_TASK_TAGS, "TASK"); //$NON-NLS-1$
-    return result;
-  }
-  /**
-   * Initializes the given viewer's colors.
-   * 
-   * @param viewer
-   *            the viewer to be initialized
-   */
-  private void initializeViewerColors(ISourceViewer viewer) {
-    IPreferenceStore store = fOverlayStore;
-    if (store != null) {
-      StyledText styledText = viewer.getTextWidget();
-      // ---------- background color ----------------------
-      Color color = store
-          .getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR)
-          ? null
-          : createColor(store, PreferenceConstants.EDITOR_BACKGROUND_COLOR,
-              styledText.getDisplay());
-      styledText.setBackground(color);
-      if (fBackgroundColor != null)
-        fBackgroundColor.dispose();
-      fBackgroundColor = color;
-    }
-  }
-  /**
-   * Creates a color from the information stored in the given preference store.
-   * Returns <code>null</code> if there is no such information available.
-   */
-  private Color createColor(IPreferenceStore store, String key, Display display) {
-    RGB rgb = null;
-    if (store.contains(key)) {
-      if (store.isDefault(key))
-        rgb = PreferenceConverter.getDefaultColor(store, key);
-      else
-        rgb = PreferenceConverter.getColor(store, key);
-      if (rgb != null)
-        return new Color(display, rgb);
-    }
-    return null;
-  }
-  // sets enabled flag for a control and all its sub-tree
-  private static void setEnabled(Control control, boolean enable) {
-    control.setEnabled(enable);
-    if (control instanceof Composite) {
-      Composite composite = (Composite) control;
-      Control[] children = composite.getChildren();
-      for (int i = 0; i < children.length; i++)
-        setEnabled(children[i], enable);
-    }
-  }
-  private Control createAppearancePage(Composite parent) {
-    Composite appearanceComposite = new Composite(parent, SWT.NONE);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 2;
-    appearanceComposite.setLayout(layout);
-    String label = PHPUIMessages.getString("PHPEditorPreferencePage.textFont"); //$NON-NLS-1$
-    addTextFontEditor(appearanceComposite, label, JFaceResources.TEXT_FONT);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
-    addTextField(appearanceComposite, label,
-        PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.printMarginColumn"); //$NON-NLS-1$
-    addTextField(appearanceComposite, label,
-        PreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 3, 0, true);
-    // label=
-    // PHPUIMessages.getString("PHPEditorPreferencePage.synchronizeOnCursor");
-    // //$NON-NLS-1$
-    // addCheckBox(appearanceComposite, label,
-    // PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, 0);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.showOverviewRuler"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_OVERVIEW_RULER, 0);
-    label = PHPUIMessages.getString("PHPEditorPreferencePage.showLineNumbers"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_LINE_NUMBER_RULER, 0);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.highlightMatchingBrackets"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_MATCHING_BRACKETS, 0);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.highlightCurrentLine"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_CURRENT_LINE, 0);
-    label = PHPUIMessages.getString("PHPEditorPreferencePage.showPrintMargin"); //$NON-NLS-1$
-    addCheckBox(appearanceComposite, label,
-        PreferenceConstants.EDITOR_PRINT_MARGIN, 0);
-    Label l = new Label(appearanceComposite, SWT.LEFT);
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-    gd.horizontalSpan = 2;
-    gd.heightHint = convertHeightInCharsToPixels(1) / 2;
-    l.setLayoutData(gd);
-    l = new Label(appearanceComposite, SWT.LEFT);
-    l.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.appearanceOptions")); //$NON-NLS-1$
-    gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-    gd.horizontalSpan = 2;
-    l.setLayoutData(gd);
-    Composite editorComposite = new Composite(appearanceComposite, SWT.NONE);
-    layout = new GridLayout();
-    layout.numColumns = 2;
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    editorComposite.setLayout(layout);
-    gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
-    gd.horizontalSpan = 2;
-    editorComposite.setLayoutData(gd);
-    fAppearanceColorList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
-        | SWT.BORDER);
-    gd = new GridData(GridData.FILL_BOTH);
-    gd.heightHint = convertHeightInCharsToPixels(5);
-    fAppearanceColorList.setLayoutData(gd);
-    Composite stylesComposite = new Composite(editorComposite, SWT.NONE);
-    layout = new GridLayout();
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    layout.numColumns = 2;
-    stylesComposite.setLayout(layout);
-    stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-    l = new Label(stylesComposite, SWT.LEFT);
-    l.setText(PHPUIMessages.getString("PHPEditorPreferencePage.color")); //$NON-NLS-1$
-    gd = new GridData();
-    gd.horizontalAlignment = GridData.BEGINNING;
-    l.setLayoutData(gd);
-    fAppearanceForegroundColorEditor = new ColorEditor(stylesComposite);
-    Button foregroundColorButton = fAppearanceForegroundColorEditor.getButton();
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    foregroundColorButton.setLayoutData(gd);
-    fAppearanceColorList.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        handleAppearanceColorListSelection();
-      }
-    });
-    foregroundColorButton.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAppearanceColorList.getSelectionIndex();
-        String key = fAppearanceColorListModel[i][1];
-        PreferenceConverter.setValue(fOverlayStore, key,
-            fAppearanceForegroundColorEditor.getColorValue());
-      }
-    });
-    return appearanceComposite;
-  }
-  private Control createAnnotationsPage(Composite parent) {
-    Composite composite = new Composite(parent, SWT.NULL);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 2;
-    composite.setLayout(layout);
-    String text = PreferencesMessages
-        .getString("JavaEditorPreferencePage.analyseAnnotationsWhileTyping"); //$NON-NLS-1$
-    addCheckBox(composite, text,
-        PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS, 0);
-    text = PreferencesMessages
-        .getString("JavaEditorPreferencePage.showQuickFixables"); //$NON-NLS-1$
-    addCheckBox(composite, text,
-        PreferenceConstants.EDITOR_CORRECTION_INDICATION, 0);
-    addFiller(composite);
-    Label label = new Label(composite, SWT.LEFT);
-    label.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.annotationPresentationOptions")); //$NON-NLS-1$
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-    gd.horizontalSpan = 2;
-    label.setLayoutData(gd);
-    Composite editorComposite = new Composite(composite, SWT.NONE);
-    layout = new GridLayout();
-    layout.numColumns = 2;
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    editorComposite.setLayout(layout);
-    gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
-    gd.horizontalSpan = 2;
-    editorComposite.setLayoutData(gd);
-    fAnnotationList = new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL
-        | SWT.BORDER);
-    gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING
-        | GridData.FILL_HORIZONTAL);
-    gd.heightHint = convertHeightInCharsToPixels(10);
-    fAnnotationList.setLayoutData(gd);
-    Composite optionsComposite = new Composite(editorComposite, SWT.NONE);
-    layout = new GridLayout();
-    layout.marginHeight = 0;
-    layout.marginWidth = 0;
-    layout.numColumns = 2;
-    optionsComposite.setLayout(layout);
-    optionsComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-    fShowInTextCheckBox = new Button(optionsComposite, SWT.CHECK);
-    fShowInTextCheckBox.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.annotations.showInText")); //$NON-NLS-1$
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    fShowInTextCheckBox.setLayoutData(gd);
-    fDecorationStyleCombo = new Combo(optionsComposite, SWT.READ_ONLY);
-    for (int i = 0; i < fAnnotationDecorationListModel.length; i++)
-      fDecorationStyleCombo.add(fAnnotationDecorationListModel[i][0]);
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    gd.horizontalIndent = 20;
-    fDecorationStyleCombo.setLayoutData(gd);
-    fHighlightInTextCheckBox = new Button(optionsComposite, SWT.CHECK);
-    fHighlightInTextCheckBox.setText(PreferencesMessages
-        .getString("TextEditorPreferencePage.annotations.highlightInText")); //$NON-NLS-1$
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    fHighlightInTextCheckBox.setLayoutData(gd);
-    fShowInOverviewRulerCheckBox = new Button(optionsComposite, SWT.CHECK);
-    fShowInOverviewRulerCheckBox.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.annotations.showInOverviewRuler")); //$NON-NLS-1$
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    fShowInOverviewRulerCheckBox.setLayoutData(gd);
-    fShowInVerticalRulerCheckBox = new Button(optionsComposite, SWT.CHECK);
-    fShowInVerticalRulerCheckBox.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.annotations.showInVerticalRuler")); //$NON-NLS-1$
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    gd.horizontalSpan = 2;
-    fShowInVerticalRulerCheckBox.setLayoutData(gd);
-    label = new Label(optionsComposite, SWT.LEFT);
-    label.setText(PreferencesMessages
-        .getString("JavaEditorPreferencePage.annotations.color")); //$NON-NLS-1$
-    gd = new GridData();
-    gd.horizontalAlignment = GridData.BEGINNING;
-    label.setLayoutData(gd);
-    fAnnotationForegroundColorEditor = new ColorEditor(optionsComposite);
-    Button foregroundColorButton = fAnnotationForegroundColorEditor.getButton();
-    gd = new GridData(GridData.FILL_HORIZONTAL);
-    gd.horizontalAlignment = GridData.BEGINNING;
-    foregroundColorButton.setLayoutData(gd);
-    fAnnotationList.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        handleAnnotationListSelection();
-      }
-    });
-    fShowInTextCheckBox.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][2];
-        fOverlayStore.setValue(key, fShowInTextCheckBox.getSelection());
-        String decorationKey = fAnnotationColorListModel[i][6];
-        fDecorationStyleCombo.setEnabled(decorationKey != null
-            && fShowInTextCheckBox.getSelection());
-      }
-    });
-    fHighlightInTextCheckBox.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][4];
-        fOverlayStore.setValue(key, fHighlightInTextCheckBox.getSelection());
-      }
-    });
-    fShowInOverviewRulerCheckBox.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][3];
-        fOverlayStore
-            .setValue(key, fShowInOverviewRulerCheckBox.getSelection());
-      }
-    });
-    fShowInVerticalRulerCheckBox.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][5];
-        fOverlayStore
-            .setValue(key, fShowInVerticalRulerCheckBox.getSelection());
-      }
-    });
-    foregroundColorButton.addSelectionListener(new SelectionListener() {
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][1];
-        PreferenceConverter.setValue(fOverlayStore, key,
-            fAnnotationForegroundColorEditor.getColorValue());
-      }
-    });
-    fDecorationStyleCombo.addSelectionListener(new SelectionListener() {
-      /**
-       * {@inheritdoc}
-       */
-      public void widgetDefaultSelected(SelectionEvent e) {
-        // do nothing
-      }
-      /**
-       * {@inheritdoc}
-       */
-      public void widgetSelected(SelectionEvent e) {
-        int i = fAnnotationList.getSelectionIndex();
-        String key = fAnnotationColorListModel[i][6];
-        if (key != null) {
-          for (int j = 0; j < fAnnotationDecorationListModel.length; j++) {
-            if (fAnnotationDecorationListModel[j][0]
-                .equals(fDecorationStyleCombo.getText())) {
-              fOverlayStore.setValue(key, fAnnotationDecorationListModel[j][1]);
-              break;
-            }
-          }
-        }
-      }
-    });
-    return composite;
-  }
-  private String[][] createAnnotationTypeListModel(
-      MarkerAnnotationPreferences preferences) {
-    ArrayList listModelItems = new ArrayList();
-    SortedSet sortedPreferences = new TreeSet(new Comparator() {
-      /*
-       * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-       */
-      public int compare(Object o1, Object o2) {
-        if (!(o2 instanceof AnnotationPreference))
-          return -1;
-        if (!(o1 instanceof AnnotationPreference))
-          return 1;
-        AnnotationPreference a1 = (AnnotationPreference) o1;
-        AnnotationPreference a2 = (AnnotationPreference) o2;
-        return Collator.getInstance().compare(a1.getPreferenceLabel(),
-            a2.getPreferenceLabel());
-      }
-    });
-    sortedPreferences.addAll(preferences.getAnnotationPreferences());
-    Iterator e = sortedPreferences.iterator();
-    while (e.hasNext()) {
-      AnnotationPreference info = (AnnotationPreference) e.next();
-      listModelItems.add(new String[]{info.getPreferenceLabel(),
-          info.getColorPreferenceKey(), info.getTextPreferenceKey(),
-          info.getOverviewRulerPreferenceKey(),
-          info.getHighlightPreferenceKey(),
-          info.getVerticalRulerPreferenceKey(),
-          info.getTextStylePreferenceKey()});
-    }
-    String[][] items = new String[listModelItems.size()][];
-    listModelItems.toArray(items);
-    return items;
-  }
-  private Control createBehaviourPage(Composite parent) {
-    Composite composite = new Composite(parent, SWT.NULL);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 2;
-    composite.setLayout(layout);
-    String label;
-    //                 String label=
-    // PHPUIMessages.getString("PHPEditorPreferencePage.wrapStrings");
-    // //$NON-NLS-1$
-    //                 addCheckBox(composite, label, PreferenceConstants.EDITOR_WRAP_STRINGS,
-    // 1);
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.smartHomeEnd");
-    // //$NON-NLS-1$
-    //                 addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END,
-    // 1);
-    //  
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.smartPaste");
-    // //$NON-NLS-1$
-    //                 addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_PASTE,
-    // 1);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.insertSpaceForTabs"); //$NON-NLS-1$
-    addCheckBox(composite, label, PreferenceConstants.EDITOR_SPACES_FOR_TABS, 1);
-    label = PHPUIMessages.getString("PHPEditorPreferencePage.closeStringsPHP"); //$NON-NLS-1$
-    addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP,
-        1);
-    label = PHPUIMessages.getString("PHPEditorPreferencePage.closeBracketsPHP"); //$NON-NLS-1$
-    addCheckBox(composite, label,
-        PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP, 1);
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.closeBraces");
-    // //$NON-NLS-1$
-    //                 addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACES,
-    // 1);
-    //  
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.closePHPDocs");
-    // //$NON-NLS-1$
-    //                 Button button= addCheckBox(composite, label,
-    // PreferenceConstants.EDITOR_CLOSE_JAVADOCS, 1);
-    //  
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.addPHPDocTags");
-    // //$NON-NLS-1$
-    //                 fAddJavaDocTagsButton= addCheckBox(composite, label,
-    // PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, 1);
-    //                 createDependency(button, fAddJavaDocTagsButton);
-    //                 label= PHPUIMessages.getString("PHPEditorPreferencePage.formatPHPDocs");
-    // //$NON-NLS-1$
-    //                 addCheckBox(composite, label,
-    // PreferenceConstants.EDITOR_FORMAT_JAVADOCS, 1);
-    //         
-    label = PHPUIMessages.getString("PHPEditorPreferencePage.closeStringsHTML"); //$NON-NLS-1$
-    addCheckBox(composite, label,
-        PreferenceConstants.EDITOR_CLOSE_STRINGS_HTML, 1);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.closeBracketsHTML"); //$NON-NLS-1$
-    addCheckBox(composite, label,
-        PreferenceConstants.EDITOR_CLOSE_BRACKETS_HTML, 1);
-    return composite;
-  }
-  
-  private static void indent(Control control) {
-    GridData gridData = new GridData();
-    gridData.horizontalIndent = 20;
-    control.setLayoutData(gridData);
-  }
-  private static void createDependency(final Button master, final Control slave) {
-    indent(slave);
-    master.addSelectionListener(new SelectionListener() {
-      public void widgetSelected(SelectionEvent e) {
-        slave.setEnabled(master.getSelection());
-      }
-      public void widgetDefaultSelected(SelectionEvent e) {
-      }
-    });
-  }
-  private Control createContentAssistPage(Composite parent) {
-    Composite contentAssistComposite = new Composite(parent, SWT.NULL);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 2;
-    contentAssistComposite.setLayout(layout);
-    String label;
-    //    String label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.insertSingleProposalsAutomatically");
-    // //$NON-NLS-1$
-    //    addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_AUTOINSERT, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.showOnlyProposalsVisibleInTheInvocationContext");
-    // //$NON-NLS-1$
-    //    addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.presentProposalsInAlphabeticalOrder");
-    // //$NON-NLS-1$
-    //    addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_ORDER_PROPOSALS, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.automaticallyAddImportInsteadOfQualifiedName");
-    // //$NON-NLS-1$
-    //    addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_ADDIMPORT, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.insertCompletion");
-    // //$NON-NLS-1$
-    //    addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_INSERT_COMPLETION, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.fillArgumentNamesOnMethodCompletion");
-    // //$NON-NLS-1$
-    //    Button button = addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.guessArgumentNamesOnMethodCompletion");
-    // //$NON-NLS-1$
-    //    fGuessMethodArgumentsButton =
-    //      addCheckBox(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS, 0);
-    //    createDependency(button, fGuessMethodArgumentsButton);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.enableAutoActivation"); //$NON-NLS-1$
-    final Button autoactivation = addCheckBox(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION, 0);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.autoActivationDelay"); //$NON-NLS-1$
-    fAutoInsertDelayText = addTextField(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY, 4, 0, true);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.autoActivationTriggersForPHP"); //$NON-NLS-1$
-    fAutoInsertJavaTriggerText = addTextField(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA, 4, 0,
-        false);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.autoActivationTriggersForPHPDoc"); //$NON-NLS-1$
-    fAutoInsertJavaDocTriggerText = addTextField(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC, 4, 0,
-        false);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.autoActivationTriggersForHTML"); //$NON-NLS-1$
-    fAutoInsertHTMLTriggerText = addTextField(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_HTML, 4, 0,
-        false);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.backgroundForCompletionProposals"); //$NON-NLS-1$
-    addColorButton(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, 0);
-    label = PHPUIMessages
-        .getString("PHPEditorPreferencePage.foregroundForCompletionProposals"); //$NON-NLS-1$
-    addColorButton(contentAssistComposite, label,
-        PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, 0);
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.backgroundForMethodParameters");
-    // //$NON-NLS-1$
-    //    addColorButton(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.foregroundForMethodParameters");
-    // //$NON-NLS-1$
-    //    addColorButton(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND, 0);
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.backgroundForCompletionReplacement");
-    // //$NON-NLS-1$
-    //    addColorButton(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND, 0);
-    //
-    //    label =
-    // PHPUIMessages.getString("PHPEditorPreferencePage.foregroundForCompletionReplacement");
-    // //$NON-NLS-1$
-    //    addColorButton(contentAssistComposite, label,
-    // PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND, 0);
-    autoactivation.addSelectionListener(new SelectionAdapter() {
-      public void widgetSelected(SelectionEvent e) {
-        updateAutoactivationControls();
-      }
-    });
-    return contentAssistComposite;
-  }
-  /*
-   * @see PreferencePage#createContents(Composite)
-   */
-  protected Control createContents(Composite parent) {
-    initializeDefaultColors();
-    fOverlayStore.load();
-    fOverlayStore.start();
-    TabFolder folder = new TabFolder(parent, SWT.NONE);
-    folder.setLayout(new TabFolderLayout());
-    folder.setLayoutData(new GridData(GridData.FILL_BOTH));
-    TabItem item = new TabItem(folder, SWT.NONE);
-    item.setText(PHPUIMessages.getString("PHPEditorPreferencePage.general")); //$NON-NLS-1$
-    item.setControl(createAppearancePage(folder));
-    item = new TabItem(folder, SWT.NONE);
-    item.setText(PHPUIMessages.getString("PHPEditorPreferencePage.colors")); //$NON-NLS-1$
-    item.setControl(createSyntaxPage(folder));
-    item = new TabItem(folder, SWT.NONE);
-    item.setText(PHPUIMessages.getString("PHPEditorPreferencePage.codeAssist")); //$NON-NLS-1$
-    item.setControl(createContentAssistPage(folder));
-    item = new TabItem(folder, SWT.NONE);
-    item.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.annotationsTab.title")); //$NON-NLS-1$
-    item.setControl(createAnnotationsPage(folder));
-    item = new TabItem(folder, SWT.NONE);
-    item.setText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.behaviourTab.title")); //$NON-NLS-1$
-    item.setControl(createBehaviourPage(folder));
-               item= new TabItem(folder, SWT.NONE);
-               item.setText(PHPUIMessages.getString("PHPEditorPreferencePage.hoverTab.title"));
-     //$NON-NLS-1$
-//             fJavaEditorHoverConfigurationBlock= new
-//     JavaEditorHoverConfigurationBlock(fOverlayStore);
-//             item.setControl(fJavaEditorHoverConfigurationBlock.createControl(folder));
-    initialize();
-    return folder;
-  }
-  private void initialize() {
-    fFontEditor.setPreferenceStore(getPreferenceStore());
-    fFontEditor.setPreferencePage(this);
-    fFontEditor.load();
-    initializeFields();
-    for (int i = 0; i < fSyntaxColorListModel.length; i++)
-      fSyntaxColorList.add(fSyntaxColorListModel[i][0]);
-    fSyntaxColorList.getDisplay().asyncExec(new Runnable() {
-      public void run() {
-        if (fSyntaxColorList != null && !fSyntaxColorList.isDisposed()) {
-          fSyntaxColorList.select(0);
-          handleSyntaxColorListSelection();
-        }
-      }
-    });
-    for (int i = 0; i < fAppearanceColorListModel.length; i++)
-      fAppearanceColorList.add(fAppearanceColorListModel[i][0]);
-    fAppearanceColorList.getDisplay().asyncExec(new Runnable() {
-      public void run() {
-        if (fAppearanceColorList != null && !fAppearanceColorList.isDisposed()) {
-          fAppearanceColorList.select(0);
-          handleAppearanceColorListSelection();
-        }
-      }
-    });
-    for (int i = 0; i < fAnnotationColorListModel.length; i++)
-      fAnnotationList.add(fAnnotationColorListModel[i][0]);
-    fAnnotationList.getDisplay().asyncExec(new Runnable() {
-      public void run() {
-        if (fAnnotationList != null && !fAnnotationList.isDisposed()) {
-          fAnnotationList.select(0);
-          handleAnnotationListSelection();
-        }
-      }
-    });
-//     for (int i= 0; i < fContentAssistColorListModel.length; i++)
-//             fContentAssistColorList.add(fContentAssistColorListModel[i][0]);
-//     fContentAssistColorList.getDisplay().asyncExec(new Runnable() {
-//             public void run() {
-//                     if (fContentAssistColorList != null &&
-//     !fContentAssistColorList.isDisposed()) {
-//                             fContentAssistColorList.select(0);
-//                             handleContentAssistColorListSelection();
-//                     }
-//             }
-//     });
-  }
-  private void initializeFields() {
-    Iterator e = fColorButtons.keySet().iterator();
-    while (e.hasNext()) {
-      ColorEditor c = (ColorEditor) e.next();
-      String key = (String) fColorButtons.get(c);
-      RGB rgb = PreferenceConverter.getColor(fOverlayStore, key);
-      c.setColorValue(rgb);
-    }
-    e = fCheckBoxes.keySet().iterator();
-    while (e.hasNext()) {
-      Button b = (Button) e.next();
-      String key = (String) fCheckBoxes.get(b);
-      b.setSelection(fOverlayStore.getBoolean(key));
-    }
-    e = fTextFields.keySet().iterator();
-    while (e.hasNext()) {
-      Text t = (Text) e.next();
-      String key = (String) fTextFields.get(t);
-      t.setText(fOverlayStore.getString(key));
-    }
-    RGB rgb = PreferenceConverter.getColor(fOverlayStore,
-        PreferenceConstants.EDITOR_BACKGROUND_COLOR);
-    fBackgroundColorEditor.setColorValue(rgb);
-    boolean default_ = fOverlayStore
-        .getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
-    fBackgroundDefaultRadioButton.setSelection(default_);
-    fBackgroundCustomRadioButton.setSelection(!default_);
-    fBackgroundColorButton.setEnabled(!default_);
-    //    boolean closeJavaDocs=
-    // fOverlayStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
-    //    fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
-    //    boolean fillMethodArguments =
-    // fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
-    //    fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
-    updateAutoactivationControls();
-    // fJavaEditorHoverConfigurationBlock.initializeFields();
-  }
-  
-  private void initializeDefaultColors() {     
-               if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_BACKGROUND_COLOR)) {
-                       RGB rgb= getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
-                       PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
-                       PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_BACKGROUND_COLOR, rgb);
-               }
-               if (!getPreferenceStore().contains(PreferenceConstants.EDITOR_FOREGROUND_COLOR)) {
-                       RGB rgb= getControl().getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
-                       PreferenceConverter.setDefault(fOverlayStore, PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
-                       PreferenceConverter.setDefault(getPreferenceStore(), PreferenceConstants.EDITOR_FOREGROUND_COLOR, rgb);
-               }
-  }
-  
-  private void updateAutoactivationControls() {
-    boolean autoactivation = fOverlayStore
-        .getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION);
-    fAutoInsertDelayText.setEnabled(autoactivation);
-    fAutoInsertJavaTriggerText.setEnabled(autoactivation);
-    fAutoInsertJavaDocTriggerText.setEnabled(autoactivation);
-    fAutoInsertHTMLTriggerText.setEnabled(autoactivation);
-  }
-  /*
-   * @see PreferencePage#performOk()
-   */
-  public boolean performOk() {
-    fFontEditor.store();
-    // fJavaEditorHoverConfigurationBlock.performOk();
-    fOverlayStore.propagate();
-    // fUserDefinedPHPSyntaxFileFFE.store();
-    PHPeclipsePlugin.getDefault().savePluginPreferences();
-    return true;
-  }
-  /*
-   * @see PreferencePage#performDefaults()
-   */
-  protected void performDefaults() {
-    fFontEditor.loadDefault();
-    fOverlayStore.loadDefaults();
-    initializeFields();
-    //  fUserDefinedPHPSyntaxFileFFE.loadDefault();
-    handleSyntaxColorListSelection();
-    handleAppearanceColorListSelection();
-    handleAnnotationListSelection();
-    // handleContentAssistColorListSelection();
-    super.performDefaults();
-    fPreviewViewer.invalidateTextPresentation();
-  }
-  /*
-   * @see DialogPage#dispose()
-   */
-  public void dispose() {
-    if (fJavaTextTools != null) {
-      fJavaTextTools = null;
-    }
-    fFontEditor.setPreferencePage(null);
-    fFontEditor.setPreferenceStore(null);
-    if (fOverlayStore != null) {
-      fOverlayStore.stop();
-      fOverlayStore = null;
-    }
-    super.dispose();
-  }
-  private Control addColorButton(Composite composite, String label, String key,
-      int indentation) {
-    Label labelControl = new Label(composite, SWT.NONE);
-    labelControl.setText(label);
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-    gd.horizontalIndent = indentation;
-    labelControl.setLayoutData(gd);
-    ColorEditor editor = new ColorEditor(composite);
-    Button button = editor.getButton();
-    button.setData(editor);
-    gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-    button.setLayoutData(gd);
-    button.addSelectionListener(fColorButtonListener);
-    fColorButtons.put(editor, key);
-    return composite;
-  }
-  private void addFiller(Composite composite) {
-    Label filler = new Label(composite, SWT.LEFT);
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-    gd.horizontalSpan = 2;
-    gd.heightHint = convertHeightInCharsToPixels(1) / 2;
-    filler.setLayoutData(gd);
-  }
-  private Button addCheckBox(Composite parent, String label, String key,
-      int indentation) {
-    Button checkBox = new Button(parent, SWT.CHECK);
-    checkBox.setText(label);
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-    gd.horizontalIndent = indentation;
-    gd.horizontalSpan = 2;
-    checkBox.setLayoutData(gd);
-    checkBox.addSelectionListener(fCheckBoxListener);
-    fCheckBoxes.put(checkBox, key);
-    return checkBox;
-  }
-  private Control addTextField(Composite composite, String label, String key,
-      int textLimit, int indentation, boolean isNumber) {
-    Label labelControl = new Label(composite, SWT.NONE);
-    labelControl.setText(label);
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-    gd.horizontalIndent = indentation;
-    labelControl.setLayoutData(gd);
-    Text textControl = new Text(composite, SWT.BORDER | SWT.SINGLE);
-    gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-    gd.widthHint = convertWidthInCharsToPixels(textLimit + 1);
-    textControl.setLayoutData(gd);
-    textControl.setTextLimit(textLimit);
-    fTextFields.put(textControl, key);
-    if (isNumber) {
-      fNumberFields.add(textControl);
-      textControl.addModifyListener(fNumberFieldListener);
-    } else {
-      textControl.addModifyListener(fTextFieldListener);
-    }
-    return textControl;
-  }
-  private void addTextFontEditor(Composite parent, String label, String key) {
-    Composite editorComposite = new Composite(parent, SWT.NONE);
-    GridLayout layout = new GridLayout();
-    layout.numColumns = 3;
-    editorComposite.setLayout(layout);
-    fFontEditor = new WorkbenchChainedTextFontFieldEditor(key, label,
-        editorComposite);
-    fFontEditor.setChangeButtonText(PHPUIMessages
-        .getString("PHPEditorPreferencePage.change")); //$NON-NLS-1$
-    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-    gd.horizontalSpan = 2;
-    editorComposite.setLayoutData(gd);
-  }
-  private String loadPreviewContentFromFile(String filename) {
-    String line;
-    String separator = System.getProperty("line.separator"); //$NON-NLS-1$
-    StringBuffer buffer = new StringBuffer(512);
-    BufferedReader reader = null;
-    try {
-      reader = new BufferedReader(new InputStreamReader(getClass()
-          .getResourceAsStream(filename)));
-      while ((line = reader.readLine()) != null) {
-        buffer.append(line);
-        buffer.append(separator);
-      }
-    } catch (IOException io) {
-      PHPeclipsePlugin.log(io);
-    } finally {
-      if (reader != null) {
-        try {
-          reader.close();
-        } catch (IOException e) {
-        }
-      }
-    }
-    return buffer.toString();
-  }
-  private void numberFieldChanged(Text textControl) {
-    String number = textControl.getText();
-    IStatus status = validatePositiveNumber(number);
-    if (!status.matches(IStatus.ERROR))
-      fOverlayStore.setValue((String) fTextFields.get(textControl), number);
-    updateStatus(status);
-  }
-  private IStatus validatePositiveNumber(String number) {
-    StatusInfo status = new StatusInfo();
-    if (number.length() == 0) {
-      status.setError(PHPUIMessages
-          .getString("PHPEditorPreferencePage.empty_input")); //$NON-NLS-1$
-    } else {
-      try {
-        int value = Integer.parseInt(number);
-        if (value < 0)
-          status.setError(PHPUIMessages.getFormattedString(
-              "PHPEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
-      } catch (NumberFormatException e) {
-        status.setError(PHPUIMessages.getFormattedString(
-            "PHPEditorPreferencePage.invalid_input", number)); //$NON-NLS-1$
-      }
-    }
-    return status;
-  }
-  private void updateStatus(IStatus status) {
-    if (!status.matches(IStatus.ERROR)) {
-      for (int i = 0; i < fNumberFields.size(); i++) {
-        Text text = (Text) fNumberFields.get(i);
-        IStatus s = validatePositiveNumber(text.getText());
-        status = StatusUtil.getMoreSevere(s, status);
-      }
-    }
-    setValid(!status.matches(IStatus.ERROR));
-    StatusUtil.applyToStatusLine(this, status);
-  }
-  /**
-   * @deprecated Inline to avoid reference to preference page
-   */
-  public static boolean indicateQuixFixableProblems() {
-    return PreferenceConstants.getPreferenceStore().getBoolean(
-        PreferenceConstants.EDITOR_CORRECTION_INDICATION);
-  }
-  /**
-   * @deprecated Inline to avoid reference to preference page
-   */
-  //   static public boolean synchronizeOutlineOnCursorMove() {
-  //           return
-  // PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE);
-  //   }
-}
\ No newline at end of file
index 6363cbc..15ce377 100644 (file)
@@ -167,7 +167,8 @@ JavaEditorPreferencePage.appearanceOptions=Appearance co&lor options:
 
 JavaEditorPreferencePage.typing.tabTitle= T&yping
 JavaEditorPreferencePage.typing.description= Select options for automatic text modifications
-JavaEditorPreferencePage.closeStrings= Close strin&gs
+JavaEditorPreferencePage.closeStringsDQ= Close double quoted strin&gs
+JavaEditorPreferencePage.closeStringsSQ= Close &single quoted strings
 JavaEditorPreferencePage.closeBrackets= Close &brackets and parenthesis
 JavaEditorPreferencePage.closeBraces= Cl&ose braces
 JavaEditorPreferencePage.closeJavaDocs= Close PHP&docs and comments
index 2ac2f8b..a4d6700 100644 (file)
@@ -740,9 +740,16 @@ public class PreferenceConstants {
    * <p>
    * Value is of type <code>Boolean</code>.
    * </p>
-   * @since 2.1
    */
-  public final static String EDITOR_CLOSE_STRINGS_PHP = "closeStringsPHP"; //$NON-NLS-1$
+  public final static String EDITOR_CLOSE_STRINGS_DQ_PHP = "closeStringsPHPDQ"; //$NON-NLS-1$
+  /**
+   * A named preference that controls whether the 'close strings' feature
+   *  is   enabled in PHP mode
+   * <p>
+   * Value is of type <code>Boolean</code>.
+   * </p>
+   */
+  public final static String EDITOR_CLOSE_STRINGS_SQ_PHP = "closeStringsPHPSQ"; //$NON-NLS-1$
 
   /**
    * A named preference that controls whether the 'close brackets' feature is
@@ -2383,7 +2390,8 @@ public final static String EDITOR_TEXT_FONT= "net.sourceforge.phpdt.ui.editors.t
     store.setDefault(PreferenceConstants.EDITOR_SMART_HOME_END, true);
        store.setDefault(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true);
     store.setDefault(PreferenceConstants.EDITOR_SMART_PASTE, true);
-    store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP, true);
+    store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP, true);
+    store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP, true);
     store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP, true);
     store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACES, true);
     store.setDefault(PreferenceConstants.EDITOR_CLOSE_JAVADOCS, true);
index 0a2fd89..6755004 100644 (file)
@@ -110,277 +110,6 @@ public class PHPUnitEditor extends PHPEditor { //implements
     void customizeDocumentCommand(IDocument document, DocumentCommand command);
   };
 
-  //  class AdaptedRulerLayout extends Layout {
-  //
-  //    protected int fGap;
-  //    protected AdaptedSourceViewer fAdaptedSourceViewer;
-  //
-  //    protected AdaptedRulerLayout(int gap, AdaptedSourceViewer asv) {
-  //      fGap = gap;
-  //      fAdaptedSourceViewer = asv;
-  //    }
-  //
-  //    protected Point computeSize(Composite composite, int wHint, int hHint,
-  // boolean flushCache) {
-  //      Control[] children = composite.getChildren();
-  //      Point s = children[children.length - 1].computeSize(SWT.DEFAULT,
-  // SWT.DEFAULT, flushCache);
-  //      if (fAdaptedSourceViewer.isVerticalRulerVisible())
-  //        s.x += fAdaptedSourceViewer.getVerticalRuler().getWidth() + fGap;
-  //      return s;
-  //    }
-  //
-  //    protected void layout(Composite composite, boolean flushCache) {
-  //      Rectangle clArea = composite.getClientArea();
-  //      if (fAdaptedSourceViewer.isVerticalRulerVisible()) {
-  //
-  //        StyledText textWidget = fAdaptedSourceViewer.getTextWidget();
-  //        Rectangle trim = textWidget.computeTrim(0, 0, 0, 0);
-  //        int scrollbarHeight = trim.height;
-  //
-  //        IVerticalRuler vr = fAdaptedSourceViewer.getVerticalRuler();
-  //        int vrWidth = vr.getWidth();
-  //
-  //        int orWidth = 0;
-  //        if (fAdaptedSourceViewer.isOverviewRulerVisible()) {
-  //          OverviewRuler or = fAdaptedSourceViewer.getOverviewRuler();
-  //          orWidth = or.getWidth();
-  //          or.getControl().setBounds(clArea.width - orWidth, scrollbarHeight,
-  // orWidth, clArea.height - 3 * scrollbarHeight);
-  //        }
-  //
-  //        textWidget.setBounds(vrWidth + fGap, 0, clArea.width - vrWidth - orWidth
-  // -
-  // 2 * fGap, clArea.height);
-  //        vr.getControl().setBounds(0, 0, vrWidth, clArea.height -
-  // scrollbarHeight);
-  //
-  //      } else {
-  //        StyledText textWidget = fAdaptedSourceViewer.getTextWidget();
-  //        textWidget.setBounds(0, 0, clArea.width, clArea.height);
-  //      }
-  //    }
-  //  };
-  //
-  //  class AdaptedSourceViewer extends SourceViewer { // extends
-  // JavaCorrectionSourceViewer {
-  //
-  //    private List fTextConverters;
-  //
-  //    private OverviewRuler fOverviewRuler;
-  //    private boolean fIsOverviewRulerVisible;
-  //    /** The viewer's overview ruler hovering controller */
-  //    private AbstractHoverInformationControlManager
-  // fOverviewRulerHoveringController;
-  //
-  //    private boolean fIgnoreTextConverters = false;
-  //
-  //    private IVerticalRuler fCachedVerticalRuler;
-  //    private boolean fCachedIsVerticalRulerVisible;
-  //
-  //    public AdaptedSourceViewer(Composite parent, IVerticalRuler ruler, int
-  // styles) {
-  //      super(parent, ruler, styles); //, CompilationUnitEditor.this);
-  //
-  //      fCachedVerticalRuler = ruler;
-  //      fCachedIsVerticalRulerVisible = (ruler != null);
-  //      fOverviewRuler = new OverviewRuler(VERTICAL_RULER_WIDTH);
-  //
-  //      delayedCreateControl(parent, styles);
-  //    }
-  //
-  //    /*
-  //     * @see ISourceViewer#showAnnotations(boolean)
-  //     */
-  //    public void showAnnotations(boolean show) {
-  //      fCachedIsVerticalRulerVisible = (show && fCachedVerticalRuler != null);
-  //      // super.showAnnotations(show);
-  //    }
-  //
-  //    public IContentAssistant getContentAssistant() {
-  //      return fContentAssistant;
-  //    }
-  //
-  //    /*
-  //     * @see ITextOperationTarget#doOperation(int)
-  //     */
-  //    public void doOperation(int operation) {
-  //
-  //      if (getTextWidget() == null)
-  //        return;
-  //
-  //      switch (operation) {
-  //        case CONTENTASSIST_PROPOSALS :
-  //          String msg = fContentAssistant.showPossibleCompletions();
-  //          setStatusLineErrorMessage(msg);
-  //          return;
-  //        case UNDO :
-  //          fIgnoreTextConverters = true;
-  //          break;
-  //        case REDO :
-  //          fIgnoreTextConverters = true;
-  //          break;
-  //      }
-  //
-  //      super.doOperation(operation);
-  //    }
-  //
-  //    public void insertTextConverter(ITextConverter textConverter, int index)
-  // {
-  //      throw new UnsupportedOperationException();
-  //    }
-  //
-  //    public void addTextConverter(ITextConverter textConverter) {
-  //      if (fTextConverters == null) {
-  //        fTextConverters = new ArrayList(1);
-  //        fTextConverters.add(textConverter);
-  //      } else if (!fTextConverters.contains(textConverter))
-  //        fTextConverters.add(textConverter);
-  //    }
-  //
-  //    public void removeTextConverter(ITextConverter textConverter) {
-  //      if (fTextConverters != null) {
-  //        fTextConverters.remove(textConverter);
-  //        if (fTextConverters.size() == 0)
-  //          fTextConverters = null;
-  //      }
-  //    }
-  //
-  //    /*
-  //     * @see TextViewer#customizeDocumentCommand(DocumentCommand)
-  //     */
-  //    protected void customizeDocumentCommand(DocumentCommand command) {
-  //      super.customizeDocumentCommand(command);
-  //      if (!fIgnoreTextConverters && fTextConverters != null) {
-  //        for (Iterator e = fTextConverters.iterator(); e.hasNext();)
-  //           ((ITextConverter) e.next()).customizeDocumentCommand(getDocument(),
-  // command);
-  //      }
-  //      fIgnoreTextConverters = false;
-  //    }
-  //
-  //    public IVerticalRuler getVerticalRuler() {
-  //      return fCachedVerticalRuler;
-  //    }
-  //
-  //    public boolean isVerticalRulerVisible() {
-  //      return fCachedIsVerticalRulerVisible;
-  //    }
-  //
-  //    public OverviewRuler getOverviewRuler() {
-  //      return fOverviewRuler;
-  //    }
-  //
-  //    /*
-  //     * @see TextViewer#createControl(Composite, int)
-  //     */
-  //    protected void createControl(Composite parent, int styles) {
-  //      // do nothing here
-  //    }
-  //
-  //    protected void delayedCreateControl(Composite parent, int styles) {
-  //      //create the viewer
-  //      super.createControl(parent, styles);
-  //
-  //      Control control = getControl();
-  //      if (control instanceof Composite) {
-  //        Composite composite = (Composite) control;
-  //        composite.setLayout(new AdaptedRulerLayout(GAP_SIZE, this));
-  //        fOverviewRuler.createControl(composite, this);
-  //      }
-  //    }
-  //    protected void ensureOverviewHoverManagerInstalled() {
-  //      if (fOverviewRulerHoveringController == null && fAnnotationHover != null
-  // && fHoverControlCreator != null) {
-  //        fOverviewRulerHoveringController =
-  //          new OverviewRulerHoverManager(fOverviewRuler, this, fAnnotationHover,
-  // fHoverControlCreator);
-  //        fOverviewRulerHoveringController.install(fOverviewRuler.getControl());
-  //      }
-  //    }
-  //
-  //    public void hideOverviewRuler() {
-  //      fIsOverviewRulerVisible = false;
-  //      Control control = getControl();
-  //      if (control instanceof Composite) {
-  //        Composite composite = (Composite) control;
-  //        composite.layout();
-  //      }
-  //      if (fOverviewRulerHoveringController != null) {
-  //        fOverviewRulerHoveringController.dispose();
-  //        fOverviewRulerHoveringController = null;
-  //      }
-  //    }
-  //
-  //    public void showOverviewRuler() {
-  //      fIsOverviewRulerVisible = true;
-  //      Control control = getControl();
-  //      if (control instanceof Composite) {
-  //        Composite composite = (Composite) control;
-  //        composite.layout();
-  //      }
-  //      ensureOverviewHoverManagerInstalled();
-  //    }
-  //
-  //    public boolean isOverviewRulerVisible() {
-  //      return fIsOverviewRulerVisible;
-  //    }
-  //
-  //    /*
-  //     * @see ISourceViewer#setDocument(IDocument, IAnnotationModel, int, int)
-  //     */
-  //    public void setDocument(
-  //      IDocument document,
-  //      IAnnotationModel annotationModel,
-  //      int visibleRegionOffset,
-  //      int visibleRegionLength) {
-  //      super.setDocument(document, annotationModel, visibleRegionOffset,
-  // visibleRegionLength);
-  //      fOverviewRuler.setModel(annotationModel);
-  //    }
-  //
-  //    // http://dev.eclipse.org/bugs/show_bug.cgi?id=19270
-  //    public void updateIndentationPrefixes() {
-  //      SourceViewerConfiguration configuration = getSourceViewerConfiguration();
-  //      String[] types = configuration.getConfiguredContentTypes(this);
-  //      for (int i = 0; i < types.length; i++) {
-  //        String[] prefixes = configuration.getIndentPrefixes(this, types[i]);
-  //        if (prefixes != null && prefixes.length > 0)
-  //          setIndentPrefixes(prefixes, types[i]);
-  //      }
-  //    }
-  //
-  //    /*
-  //     * @see IWidgetTokenOwner#requestWidgetToken(IWidgetTokenKeeper)
-  //     */
-  //    public boolean requestWidgetToken(IWidgetTokenKeeper requester) {
-  //      if (WorkbenchHelp.isContextHelpDisplayed())
-  //        return false;
-  //      return super.requestWidgetToken(requester);
-  //    }
-  //
-  //    /*
-  //     * @see
-  // org.eclipse.jface.text.source.ISourceViewer#configure(org.eclipse.jface.text.source.SourceViewerConfiguration)
-  //     */
-  //    public void configure(SourceViewerConfiguration configuration) {
-  //      super.configure(configuration);
-  //      // prependAutoEditStrategy(new SmartBracesAutoEditStrategy(this),
-  // IDocument.DEFAULT_CONTENT_TYPE);
-  //    }
-  //
-  //    protected void handleDispose() {
-  //      fOverviewRuler = null;
-  //
-  //      if (fOverviewRulerHoveringController != null) {
-  //        fOverviewRulerHoveringController.dispose();
-  //        fOverviewRulerHoveringController = null;
-  //      }
-  //
-  //      super.handleDispose();
-  //    }
-  //
-  //  };
   class AdaptedSourceViewer extends JavaSourceViewer {
     private List fTextConverters;
 
@@ -990,8 +719,8 @@ public class PHPUnitEditor extends PHPEditor { //implements
       LinkedPositionUI.ExitListener {
     private boolean fCloseBracketsPHP = true;
 
-    private boolean fCloseStringsPHP = true;
-
+    private boolean fCloseStringsPHPDQ = true;
+    private boolean fCloseStringsPHPSQ = true;
     private boolean fCloseBracketsHTML = true;
 
     private boolean fCloseStringsHTML = true;
@@ -1004,10 +733,12 @@ public class PHPUnitEditor extends PHPEditor { //implements
       fCloseBracketsPHP = enabled;
     }
 
-    public void setCloseStringsPHPEnabled(boolean enabled) {
-      fCloseStringsPHP = enabled;
+    public void setCloseStringsPHPDQEnabled(boolean enabled) {
+      fCloseStringsPHPDQ = enabled;
+    }
+    public void setCloseStringsPHPSQEnabled(boolean enabled) {
+      fCloseStringsPHPSQ = enabled;
     }
-
     public void setCloseBracketsHTMLEnabled(boolean enabled) {
       fCloseBracketsHTML = enabled;
     }
@@ -1075,7 +806,9 @@ public class PHPUnitEditor extends PHPEditor { //implements
       try {
         ITypedRegion partition = document.getPartition(offset);
         String type = partition.getType();
-        if (type.equals(IPHPPartitions.PHP_PARTITIONING)) {
+        if (type.equals(IPHPPartitions.PHP_PARTITIONING)
+            || type.equals(IDocument.DEFAULT_CONTENT_TYPE)) {
+          // you will get IDocument.DEFAULT_CONTENT_TYPE for both PHP and HTML area
           switch (event.character) {
           case '(':
             if (hasCharacterToTheRight(document, offset + length, '('))
@@ -1089,7 +822,7 @@ public class PHPUnitEditor extends PHPEditor { //implements
           // fall through
           case '"':
             if (event.character == '"') {
-              if (!fCloseStringsPHP)
+              if (!fCloseStringsPHPDQ)
                 return;
               // changed for statements like echo "" print ""
               //    if (hasIdentifierToTheLeft(document, offset)
@@ -1106,46 +839,38 @@ public class PHPUnitEditor extends PHPEditor { //implements
             // &&
             // (partition.getOffset() != offset))
             //         return;
-            final char character = event.character;
-            final char closingCharacter = getPeerCharacter(character);
-            final StringBuffer buffer = new StringBuffer();
-            buffer.append(character);
-            buffer.append(closingCharacter);
-            document.replace(offset, length, buffer.toString());
-            LinkedPositionManager manager = new LinkedPositionManager(document);
-            manager.addPosition(offset + 1, 0);
+            final char characterDQ = event.character;
+            final char closingCharacterDQ = getPeerCharacter(characterDQ);
+            final StringBuffer bufferDQ = new StringBuffer();
+            bufferDQ.append(characterDQ);
+            bufferDQ.append(closingCharacterDQ);
+            document.replace(offset, length, bufferDQ.toString());
+            LinkedPositionManager managerDQ = new LinkedPositionManager(document);
+            managerDQ.addPosition(offset + 1, 0);
             fOffset = offset;
             fLength = 2;
-            LinkedPositionUI editor = new LinkedPositionUI(sourceViewer,
-                manager);
-            editor.setCancelListener(this);
-            editor.setExitPolicy(new ExitPolicy(closingCharacter));
-            editor.setFinalCaretOffset(offset + 2);
-            editor.enter();
-            IRegion newSelection = editor.getSelectedRegion();
-            sourceViewer.setSelectedRange(newSelection.getOffset(),
-                newSelection.getLength());
+            LinkedPositionUI editorDQ = new LinkedPositionUI(sourceViewer,
+                managerDQ);
+            editorDQ.setCancelListener(this);
+            editorDQ.setExitPolicy(new ExitPolicy(closingCharacterDQ));
+            editorDQ.setFinalCaretOffset(offset + 2);
+            editorDQ.enter();
+            IRegion newSelectionDQ = editorDQ.getSelectedRegion();
+            sourceViewer.setSelectedRange(newSelectionDQ.getOffset(),
+                newSelectionDQ.getLength());
             event.doit = false;
-          }
-        } else if (type.equals(IPHPPartitions.HTML)
-            || type.equals(IDocument.DEFAULT_CONTENT_TYPE)) {
-          switch (event.character) {
-          case '(':
-            if (hasCharacterToTheRight(document, offset + length, '('))
-              return;
-          // fall through
-          case '[':
-            if (!fCloseBracketsHTML)
-              return;
-            if (hasIdentifierToTheRight(document, offset + length))
-              return;
-          // fall through
-          case '"':
-            if (event.character == '"') {
-              if (!fCloseStringsHTML)
+            break;
+//          fall through
+          case '\'':
+            if (event.character == '\'') {
+              if (!fCloseStringsPHPSQ)
                 return;
-              if (hasIdentifierToTheLeft(document, offset)
-                  || hasIdentifierToTheRight(document, offset + length))
+              // changed for statements like echo "" print ""
+              //    if (hasIdentifierToTheLeft(document, offset)
+              // ||
+              // hasIdentifierToTheRight(document, offset +
+              // length))
+              if (hasIdentifierToTheRight(document, offset + length))
                 return;
             }
             //     ITypedRegion partition=
@@ -1155,28 +880,77 @@ public class PHPUnitEditor extends PHPEditor { //implements
             // &&
             // (partition.getOffset() != offset))
             //         return;
-            final char character = event.character;
-            final char closingCharacter = getPeerCharacter(character);
-            final StringBuffer buffer = new StringBuffer();
-            buffer.append(character);
-            buffer.append(closingCharacter);
-            document.replace(offset, length, buffer.toString());
-            LinkedPositionManager manager = new LinkedPositionManager(document);
-            manager.addPosition(offset + 1, 0);
+            final char characterSQ = event.character;
+            final char closingCharacterSQ = getPeerCharacter(characterSQ);
+            final StringBuffer bufferSQ = new StringBuffer();
+            bufferSQ.append(characterSQ);
+            bufferSQ.append(closingCharacterSQ);
+            document.replace(offset, length, bufferSQ.toString());
+            LinkedPositionManager managerSQ = new LinkedPositionManager(document);
+            managerSQ.addPosition(offset + 1, 0);
             fOffset = offset;
             fLength = 2;
-            LinkedPositionUI editor = new LinkedPositionUI(sourceViewer,
-                manager);
-            editor.setCancelListener(this);
-            editor.setExitPolicy(new ExitPolicy(closingCharacter));
-            editor.setFinalCaretOffset(offset + 2);
-            editor.enter();
-            IRegion newSelection = editor.getSelectedRegion();
-            sourceViewer.setSelectedRange(newSelection.getOffset(),
-                newSelection.getLength());
+            LinkedPositionUI editorSQ = new LinkedPositionUI(sourceViewer,
+                managerSQ);
+            editorSQ.setCancelListener(this);
+            editorSQ.setExitPolicy(new ExitPolicy(closingCharacterSQ));
+            editorSQ.setFinalCaretOffset(offset + 2);
+            editorSQ.enter();
+            IRegion newSelectionSQ = editorSQ.getSelectedRegion();
+            sourceViewer.setSelectedRange(newSelectionSQ.getOffset(),
+                newSelectionSQ.getLength());
             event.doit = false;
           }
         }
+//        } else if (type.equals(IPHPPartitions.HTML)) {
+//          switch (event.character) {
+//          case '(':
+//            if (hasCharacterToTheRight(document, offset + length, '('))
+//              return;
+//          // fall through
+//          case '[':
+//            if (!fCloseBracketsHTML)
+//              return;
+//            if (hasIdentifierToTheRight(document, offset + length))
+//              return;
+//          // fall through
+//          case '"':
+//            if (event.character == '"') {
+//              if (!fCloseStringsHTML)
+//                return;
+//              if (hasIdentifierToTheLeft(document, offset)
+//                  || hasIdentifierToTheRight(document, offset + length))
+//                return;
+//            }
+//            //     ITypedRegion partition=
+//            // document.getPartition(offset);
+//            //       if (!
+//            // IDocument.DEFAULT_CONTENT_TYPE.equals(partition.getType())
+//            // &&
+//            // (partition.getOffset() != offset))
+//            //         return;
+//            final char character = event.character;
+//            final char closingCharacter = getPeerCharacter(character);
+//            final StringBuffer buffer = new StringBuffer();
+//            buffer.append(character);
+//            buffer.append(closingCharacter);
+//            document.replace(offset, length, buffer.toString());
+//            LinkedPositionManager manager = new LinkedPositionManager(document);
+//            manager.addPosition(offset + 1, 0);
+//            fOffset = offset;
+//            fLength = 2;
+//            LinkedPositionUI editor = new LinkedPositionUI(sourceViewer,
+//                manager);
+//            editor.setCancelListener(this);
+//            editor.setExitPolicy(new ExitPolicy(closingCharacter));
+//            editor.setFinalCaretOffset(offset + 2);
+//            editor.enter();
+//            IRegion newSelection = editor.getSelectedRegion();
+//            sourceViewer.setSelectedRange(newSelection.getOffset(),
+//                newSelection.getLength());
+//            event.doit = false;
+//          }
+//        }
       } catch (BadLocationException e) {
       }
     }
@@ -1348,8 +1122,10 @@ public class PHPUnitEditor extends PHPEditor { //implements
   /** Preference key for unknown annotation indication in overview ruler */
   private final static String UNKNOWN_INDICATION_IN_OVERVIEW_RULER = PreferenceConstants.EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER;
 
-  /** Preference key for automatically closing strings */
-  private final static String CLOSE_STRINGS_PHP = PreferenceConstants.EDITOR_CLOSE_STRINGS_PHP;
+  /** Preference key for automatically closing double quoted strings */
+  private final static String CLOSE_STRINGS_DQ_PHP = PreferenceConstants.EDITOR_CLOSE_STRINGS_DQ_PHP;
+  /** Preference key for automatically closing single quoted strings */
+  private final static String CLOSE_STRINGS_SQ_PHP = PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP;
 
   /** Preference key for automatically wrapping Java strings */
   private final static String WRAP_STRINGS = PreferenceConstants.EDITOR_WRAP_STRINGS;
@@ -1673,11 +1449,13 @@ public class PHPUnitEditor extends PHPEditor { //implements
     //    preferences.addPropertyChangeListener(fPropertyChangeListener);
     IPreferenceStore preferenceStore = getPreferenceStore();
     boolean closeBracketsPHP = preferenceStore.getBoolean(CLOSE_BRACKETS_PHP);
-    boolean closeStringsPHP = preferenceStore.getBoolean(CLOSE_STRINGS_PHP);
+    boolean closeStringsPHPDQ = preferenceStore.getBoolean(CLOSE_STRINGS_DQ_PHP);
+    boolean closeStringsPHPSQ = preferenceStore.getBoolean(CLOSE_STRINGS_SQ_PHP);
     boolean closeBracketsHTML = preferenceStore.getBoolean(CLOSE_BRACKETS_HTML);
     boolean closeStringsHTML = preferenceStore.getBoolean(CLOSE_STRINGS_HTML);
     fBracketInserter.setCloseBracketsPHPEnabled(closeBracketsPHP);
-    fBracketInserter.setCloseStringsPHPEnabled(closeStringsPHP);
+    fBracketInserter.setCloseStringsPHPDQEnabled(closeStringsPHPDQ);
+    fBracketInserter.setCloseStringsPHPSQEnabled(closeStringsPHPSQ);
     fBracketInserter.setCloseBracketsHTMLEnabled(closeBracketsHTML);
     fBracketInserter.setCloseStringsHTMLEnabled(closeStringsHTML);
     ISourceViewer sourceViewer = getSourceViewer();
@@ -1698,6 +1476,8 @@ public class PHPUnitEditor extends PHPEditor { //implements
       return '[';
     case '"':
       return character;
+    case '\'':
+      return character;
     default:
       throw new IllegalArgumentException();
     }
@@ -1953,8 +1733,13 @@ public class PHPUnitEditor extends PHPEditor { //implements
               .getBoolean(p));
           return;
         }
-        if (CLOSE_STRINGS_PHP.equals(p)) {
-          fBracketInserter.setCloseStringsPHPEnabled(getPreferenceStore()
+        if (CLOSE_STRINGS_DQ_PHP.equals(p)) {
+          fBracketInserter.setCloseStringsPHPDQEnabled(getPreferenceStore()
+              .getBoolean(p));
+          return;
+        }
+        if (CLOSE_STRINGS_SQ_PHP.equals(p)) {
+          fBracketInserter.setCloseStringsPHPSQEnabled(getPreferenceStore()
               .getBoolean(p));
           return;
         }
index 4a69135..bd918f6 100644 (file)
@@ -6,7 +6,6 @@ import java.util.Iterator;
 import java.util.List;
 
 import net.sourceforge.phpdt.internal.core.JavaProject;
-import net.sourceforge.phpdt.internal.ui.preferences.PHPEditorPreferencePage;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IProject;