added PHPDoc contexts
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / corext / template / php / PHPUnitContext.java
index 6ccc7a1..22ac0e2 100644 (file)
@@ -37,7 +37,7 @@ public class PHPUnitContext extends DocumentTemplateContext {
   protected PHPUnitContext(ContextType type, IDocument document, int completionPosition)
   //,ICompilationUnit compilationUnit)
   {
-    super(type, document, completionPosition);
+    super(type, document, completionPosition, 0);
     // fCompilationUnit= compilationUnit;
   }
 
@@ -58,7 +58,7 @@ public class PHPUnitContext extends DocumentTemplateContext {
     return
     //      fEnabled &&
     //      fContextTypeName.equals(contextTypeName) &&
-     (prefix.length() != 0) && identifier.toLowerCase().startsWith(prefix.toLowerCase());
+      (prefix.length() != 0) && identifier.toLowerCase().startsWith(prefix.toLowerCase());
   }
 
   /*
@@ -94,7 +94,7 @@ public class PHPUnitContext extends DocumentTemplateContext {
   public int getStart() {
     IDocument document = getDocument();
     try {
-      int start = getCompletionPosition();
+      int start = getCompletionOffset();
 
       while (((start != 0) && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
         || ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1) )) {
@@ -109,7 +109,7 @@ public class PHPUnitContext extends DocumentTemplateContext {
       return start;
 
     } catch (BadLocationException e) {
-      return getCompletionPosition();
+      return getCompletionOffset();
     }
   }