Code Completion inserts the brackets after functions now
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / JavaTextTools.java
index b727794..e920473 100644 (file)
@@ -8,6 +8,7 @@ package net.sourceforge.phpdt.ui.text;
 import net.sourceforge.phpdt.internal.ui.text.FastJavaPartitionScanner;
 import net.sourceforge.phpdt.internal.ui.text.JavaColorManager;
 import net.sourceforge.phpdt.internal.ui.text.phpdoc.PHPDocCodeScanner;
+import net.sourceforge.phpeclipse.IPreferenceConstants;
 import net.sourceforge.phpeclipse.phpeditor.php.HTMLCodeScanner;
 import net.sourceforge.phpeclipse.phpeditor.php.PHPCodeScanner;
 
@@ -84,9 +85,9 @@ public class JavaTextTools {
                
                fColorManager= new JavaColorManager();
                fCodeScanner= new PHPCodeScanner(fColorManager, store);
-               fMultilineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_MULTI_LINE_COMMENT);
-               fSinglelineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_SINGLE_LINE_COMMENT);
-               fStringScanner= new SingleTokenPHPScanner(fColorManager, store, IJavaColorConstants.PHP_STRING);
+               fMultilineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IPreferenceConstants.PHP_MULTILINE_COMMENT);
+               fSinglelineCommentScanner= new SingleTokenPHPScanner(fColorManager, store, IPreferenceConstants.PHP_SINGLELINE_COMMENT);
+               fStringScanner= new SingleTokenPHPScanner(fColorManager, store, IPreferenceConstants.PHP_STRING);
                fJavaDocScanner= new PHPDocCodeScanner(fColorManager, store);
     fHTMLScanner= new HTMLCodeScanner(fColorManager, store);
                fPartitionScanner= new FastJavaPartitionScanner();
@@ -243,11 +244,11 @@ public class JavaTextTools {
         * @since 2.0
         */
        public boolean affectsBehavior(PropertyChangeEvent event) {
-               return // fCodeScanner.affectsBehavior(event) ||
+               return fCodeScanner.affectsBehavior(event) ||
                                        fMultilineCommentScanner.affectsBehavior(event) ||
                                        fSinglelineCommentScanner.affectsBehavior(event) ||
-                                       fStringScanner.affectsBehavior(event); // ||
-//                                     fJavaDocScanner.affectsBehavior(event);
+                                       fStringScanner.affectsBehavior(event) ||
+                                       fJavaDocScanner.affectsBehavior(event);
        }
        
        /**
@@ -258,15 +259,15 @@ public class JavaTextTools {
         * @since 2.0
         */
        protected void adaptToPreferenceChange(PropertyChangeEvent event) {
-//             if (fCodeScanner.affectsBehavior(event))
-//                     fCodeScanner.adaptToPreferenceChange(event);
+               if (fCodeScanner.affectsBehavior(event))
+                       fCodeScanner.adaptToPreferenceChange(event);
                if (fMultilineCommentScanner.affectsBehavior(event))
                        fMultilineCommentScanner.adaptToPreferenceChange(event);
                if (fSinglelineCommentScanner.affectsBehavior(event))
                        fSinglelineCommentScanner.adaptToPreferenceChange(event);
                if (fStringScanner.affectsBehavior(event))
                        fStringScanner.adaptToPreferenceChange(event);
-//             if (fJavaDocScanner.affectsBehavior(event))
-//                     fJavaDocScanner.adaptToPreferenceChange(event);
+               if (fJavaDocScanner.affectsBehavior(event))
+                       fJavaDocScanner.adaptToPreferenceChange(event);
        }
 }
\ No newline at end of file