ContextHelp now in new module net.sourceforge.phpeclipse.phphelp
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPCodeScanner.java
index e73e00d..8c0d37a 100644 (file)
@@ -13,15 +13,12 @@ package net.sourceforge.phpeclipse.phpeditor.php;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Vector;
 
 import net.sourceforge.phpeclipse.IPreferenceConstants;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr;
 import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
 import net.sourceforge.phpeclipse.phpeditor.util.PHPWhitespaceDetector;
 import net.sourceforge.phpeclipse.phpeditor.util.PHPWordDetector;
-
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.text.TextAttribute;
@@ -137,33 +134,35 @@ public class PHPCodeScanner extends RuleBasedScanner implements IPreferenceConst
 
     // Add word rule for keywords, types, and constants.
     PHPWordRule wordRule = new PHPWordRule(new PHPWordDetector(), other);
-    //choochter-->
-    for (int i = 0; i < PHPKeywords.PHP_KEYWORS.length; i++)
-      wordRule.addWord(PHPKeywords.PHP_KEYWORS[i], keyword);
-
-    /*Read in the keywords from the XML file*/
-    PHPSyntaxRdr syntaxRdr = new PHPSyntaxRdr();
-    syntaxRdr.readFromFile(
-      "C:\\eclipse\\workspace\\net.sourceforge.phpeclipse\\src\\net\\sourceforge\\phpeclipse\\phpeditor"
-        + java.io.File.separator
-        + "syntax.xml");
-    {
-      Vector Vbuffer = syntaxRdr.getKeywords();
-      String VString = null;
-      //Read keywords
-      while ((Vbuffer != null) && (!Vbuffer.isEmpty() && ((VString = (String) Vbuffer.remove(0)) != null))) {
-        wordRule.addWord(VString, keyword);
-      }
-      //Read functions  - to be tested
-      Vbuffer = syntaxRdr.getFunctions();
-      while ((Vbuffer != null) && (!Vbuffer.isEmpty() && ((VString = (String) Vbuffer.remove(0)) != null))) {
-        wordRule.addWord(VString, functionName);
-      }
-    }
-    
-    //for (int i = 0; i < PHPFunctionNames.FUNCTION_NAMES.length; i++)
-    //  wordRule.addWord(PHPFunctionNames.FUNCTION_NAMES[i], functionName);
-    //<--choochter
+//    //choochter-->
+//    for (int i = 0; i < PHPKeywords.PHP_KEYWORS.length; i++)
+//      wordRule.addWord(PHPKeywords.PHP_KEYWORS[i], keyword);
+//
+//    /*Read in the keywords from the XML file*/
+//    PHPSyntaxRdr syntaxRdr = new PHPSyntaxRdr();
+//    syntaxRdr.readFromFile(
+//      "C:\\eclipse\\workspace\\net.sourceforge.phpeclipse\\src\\net\\sourceforge\\phpeclipse\\phpeditor"
+//        + java.io.File.separator
+//        + "syntax.xml");
+//    {
+//      Vector Vbuffer = syntaxRdr.getKeywords();
+//      String VString = null;
+//      //Read keywords
+//      while ((Vbuffer != null) && (!Vbuffer.isEmpty() && ((VString = (String) Vbuffer.remove(0)) != null))) {
+//        wordRule.addWord(VString, keyword);
+//      }
+//      //Read functions  - to be tested
+//      Vbuffer = syntaxRdr.getFunctions();
+//      while ((Vbuffer != null) && (!Vbuffer.isEmpty() && ((VString = (String) Vbuffer.remove(0)) != null))) {
+//        wordRule.addWord(VString, functionName);
+//      }
+//    }
+//    
+//    //for (int i = 0; i < PHPFunctionNames.FUNCTION_NAMES.length; i++)
+//    //  wordRule.addWord(PHPFunctionNames.FUNCTION_NAMES[i], functionName);
+//    //<--choochter
+    for (int i = 0; i < PHPFunctionNames.FUNCTION_NAMES.length; i++)
+      wordRule.addWord(PHPFunctionNames.FUNCTION_NAMES[i], functionName);
     for (int i = 0; i < fgConstants.length; i++)
       wordRule.addWord(fgConstants[i], functionName);
     rules.add(wordRule);