From: khartlage Date: Fri, 20 Aug 2004 05:24:34 +0000 (+0000) Subject: improved PHP Completion for -> operator X-Git-Url: http://git.phpeclipse.com?hp=ccd6afce6407144c31168b136f025e6c7d93fa3d improved PHP Completion for -> operator --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java index d0d7f92..a38b36d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java @@ -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; } }