misc
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / corext / template / php / JavaContext.java
index 09b5fb0..e2315a7 100644 (file)
@@ -19,7 +19,6 @@ import net.sourceforge.phpdt.internal.corext.util.Strings;
 import net.sourceforge.phpdt.internal.ui.preferences.CodeFormatterPreferencePage;
 import net.sourceforge.phpdt.internal.ui.text.template.contentassist.MultiVariable;
 import net.sourceforge.phpdt.internal.ui.util.ExceptionHandler;
-import net.sourceforge.phpdt.ui.PreferenceConstants;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.runtime.CoreException;
@@ -161,7 +160,7 @@ public class JavaContext extends CompilationUnitContext {
         while ((start != 0) && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
           start--;
 
-        if ((start != 0) && Character.isUnicodeIdentifierStart(document.getChar(start - 1)))
+        if ((start != 0) && (Character.isUnicodeIdentifierStart(document.getChar(start - 1))||(document.getChar(start - 1)=='$') ))
           start--;
 
         return start;
@@ -173,7 +172,8 @@ public class JavaContext extends CompilationUnitContext {
 
         while (start != 0 && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
           start--;
-
+        if ((start != 0) && (Character.isUnicodeIdentifierStart(document.getChar(start - 1))||(document.getChar(start - 1)=='$') ))
+          start--;
         while (start != end && Character.isWhitespace(document.getChar(start)))
           start++;
 
@@ -217,8 +217,9 @@ public class JavaContext extends CompilationUnitContext {
    */
   public String getKey() {
 
-    if (getCompletionLength() == 0)
-      return super.getKey();
+//    if (getCompletionLength() == 0) {
+//      return super.getKey();
+//    }
 
     try {
       IDocument document = getDocument();