From f5f5248aaa235d2ae4921afe99f417e3b5746301 Mon Sep 17 00:00:00 2001 From: khartlage Date: Fri, 20 Aug 2004 05:24:34 +0000 Subject: [PATCH] improved PHP Completion for -> operator --- .../phpeditor/php/PHPCompletionProcessor.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) 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; } } -- 1.7.1