new version with WorkingCopy Management
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / preferences / PHPEditorPreferencePage.java
index 8db018f..641374d 100644 (file)
@@ -26,13 +26,13 @@ import net.sourceforge.phpdt.internal.ui.util.TabFolderLayout;
 import net.sourceforge.phpdt.ui.PreferenceConstants;
 import net.sourceforge.phpdt.ui.text.JavaTextTools;
 import net.sourceforge.phpeclipse.IPreferenceConstants;
+import net.sourceforge.phpeclipse.PHPCore;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 import net.sourceforge.phpeclipse.phpeditor.PHPSourceViewerConfiguration;
 import net.sourceforge.phpeclipse.preferences.ColorEditor;
-import net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages;
 
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.core.runtime.Preferences;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.preference.PreferencePage;
@@ -68,7 +68,6 @@ 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.AbstractTextEditor;
 import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
 
 /*
@@ -77,6 +76,7 @@ import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
 public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
   private static final String BOLD = PreferenceConstants.EDITOR_BOLD_SUFFIX;
+  private static final String COMPILER_TASK_TAGS = PHPCore.COMPILER_TASK_TAGS;
 
   public final OverlayPreferenceStore.OverlayKey[] fKeys =
     new OverlayPreferenceStore.OverlayKey[] {
@@ -89,6 +89,8 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
       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),
@@ -105,7 +107,7 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
       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_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),
@@ -186,14 +188,16 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
       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.BOOLEAN, PreferenceConstants.EDITOR_CLOSE_STRINGS),
-      new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_CLOSE_BRACKETS),
+      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),
@@ -210,6 +214,8 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     {
       PHPUIMessages.getString("PHPEditorPreferencePage.singleLineComment"), PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR }, //$NON-NLS-1$
     {
+      PHPUIMessages.getString("PHPEditorPreferencePage.tags"), PreferenceConstants.EDITOR_JAVA_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$
@@ -226,7 +232,7 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     {
       PHPUIMessages.getString("PHPEditorPreferencePage.phpDocKeywords"), PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR }, //$NON-NLS-1$
     {
-      PHPUIMessages.getString("PHPEditorPreferencePage.phpDocHtmlTags"), PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD }, //$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$
     {
@@ -333,7 +339,7 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
   private Button fBackgroundCustomRadioButton;
   private Button fBackgroundColorButton;
   private Button fBoldCheckBox;
-  // private Button fAddJavaDocTagsButton;
+  //private Button fAddJavaDocTagsButton;
   // private Button fGuessMethodArgumentsButton;
   private SourceViewer fPreviewViewer;
   private Color fBackgroundColor;
@@ -536,8 +542,9 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
   }
 
   private Control createPreviewer(Composite parent) {
+    Preferences coreStore = createTemporaryCorePreferenceStore();
 
-    fJavaTextTools = new JavaTextTools(fOverlayStore);
+    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));
@@ -548,7 +555,7 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
 
     String content = loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$
     IDocument document = new Document(content);
-  //  PHPEditorEnvironment pe;
+    //  PHPEditorEnvironment pe;
     IDocumentPartitioner partitioner = fJavaTextTools.createDocumentPartitioner();
     partitioner.connect(document);
     document.setDocumentPartitioner(partitioner);
@@ -569,7 +576,13 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
 
     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.
    * 
@@ -637,7 +650,7 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     appearanceComposite.setLayout(layout);
 
     String label = PHPUIMessages.getString("PHPEditorPreferencePage.textFont"); //$NON-NLS-1$
-    addTextFontEditor(appearanceComposite, label, AbstractTextEditor.PREFERENCE_FONT);
+    addTextFontEditor(appearanceComposite, label, JFaceResources.TEXT_FONT);
 
     label = PHPUIMessages.getString("PHPEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
     addTextField(appearanceComposite, label, PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
@@ -738,11 +751,11 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     layout.numColumns = 2;
     composite.setLayout(layout);
 
-//    String text = "Analyse &problems while typing";
-//    addCheckBox(composite, text, PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS, 0);
-//
-//    text = PHPUIMessages.getString("PHPEditorPreferencePage.showQuickFixables"); //$NON-NLS-1$
-//    addCheckBox(composite, text, PreferenceConstants.EDITOR_CORRECTION_INDICATION, 0);
+    //    String text = "Analyse &problems while typing";
+    //    addCheckBox(composite, text, PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS, 0);
+    //
+    //    text = PHPUIMessages.getString("PHPEditorPreferencePage.showQuickFixables"); //$NON-NLS-1$
+    //    addCheckBox(composite, text, PreferenceConstants.EDITOR_CORRECTION_INDICATION, 0);
 
     Label label = new Label(composite, SWT.LEFT);
     GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
@@ -854,44 +867,50 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     return composite;
   }
 
-  //   private Control createBehaviourPage(Composite parent) {
-  //           Composite composite= new Composite(parent, SWT.NULL);
-  //           GridLayout layout= new GridLayout(); layout.numColumns= 2;
-  //           composite.setLayout(layout);
-  //
-  //           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.closeStrings"); //$NON-NLS-1$
-  //           addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_STRINGS, 1);
-  //
-  //           label= PHPUIMessages.getString("PHPEditorPreferencePage.closeBrackets"); //$NON-NLS-1$
-  //           addCheckBox(composite, label, PreferenceConstants.EDITOR_CLOSE_BRACKETS, 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);
-  //   
-  //           return composite;
-  //   }
+  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();
@@ -918,28 +937,28 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     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);
+    //    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);
@@ -1014,9 +1033,9 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     item.setText(PHPUIMessages.getString("PHPEditorPreferencePage.problemIndicationTab.title")); //$NON-NLS-1$
     item.setControl(createProblemIndicationPage(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.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$
@@ -1105,11 +1124,11 @@ public class PHPEditorPreferencePage extends PreferencePage implements IWorkbenc
     fBackgroundCustomRadioButton.setSelection(!default_);
     fBackgroundColorButton.setEnabled(!default_);
 
-    // boolean closeJavaDocs= fOverlayStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
-    // fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
+    //    boolean closeJavaDocs= fOverlayStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
+    //    fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
 
-//    boolean fillMethodArguments = fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
-//    fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
+    //    boolean fillMethodArguments = fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
+    //    fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
 
     updateAutoactivationControls();