improved PHP Completion for -> operator
authorkhartlage <khartlage>
Fri, 20 Aug 2004 05:24:34 +0000 (05:24 +0000)
committerkhartlage <khartlage>
Fri, 20 Aug 2004 05:24:34 +0000 (05:24 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java

index d0d7f92..a38b36d 100644 (file)
@@ -291,11 +291,12 @@ public class PHPCompletionProcessor implements IContentAssistProcessor {
             beforeLastToken = lastToken;
             if (lastToken==ITerminalSymbols.TokenNameVariable) {
               ident = scanner.getCurrentTokenSource();
-              if (ident[0]=='$' &&
-                  ident[0]=='t' &&
-                  ident[0]=='h' &&
-                  ident[0]=='i' &&
-                  ident[0]=='s') {
+              if (ident.length==5 &&
+                  ident[0]=='$' &&
+                  ident[1]=='t' &&
+                  ident[2]=='h' &&
+                  ident[3]=='i' &&
+                  ident[4]=='s') {
                 beforeLastToken = ITerminalSymbols.TokenNamethis_PHP_COMPLETION;
               }
             }