Optimized Scanner
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPCompletionProcessor.java
index 6648e89..98f40cb 100644 (file)
@@ -339,14 +339,15 @@ public class PHPCompletionProcessor implements IContentAssistProcessor {
     try {
       while (true) {
         ch = startText.charAt(--currentSQLPosition);
-        if (ch >= 'A' && ch <= 'Z') {
-          if (identEnd < 0) {
-            identEnd = currentSQLPosition + 1;
-          }
-        } else if (ch >= 'a' && ch <= 'z') {
+        if (Scanner.isSQLIdentifierPart(ch)) {
+//        if (ch >= 'A' && ch <= 'Z') {
           if (identEnd < 0) {
             identEnd = currentSQLPosition + 1;
           }
+//        } else if (ch >= 'a' && ch <= 'z') {
+//          if (identEnd < 0) {
+//            identEnd = currentSQLPosition + 1;
+//          }
         } else if (identEnd >= 0) {
           ident = startText.substring(currentSQLPosition + 1, identEnd);
           // select -- from -- where --
@@ -884,7 +885,7 @@ public class PHPCompletionProcessor implements IContentAssistProcessor {
     if (curr == PHPCodeReader.EOF)
       return false;
 
-    return Scanner.isPHPIdentifierPart((char) curr) || Scanner.isPHPIdentifierStart((char) curr);
+    return Scanner.isPHPIdentifierPart((char) curr);
   }
 
   private int guessContextInformationPosition(ITextViewer viewer, int offset) {