misc changes
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / template / DeclarationEngine.java
index f3f9132..e7c66c1 100644 (file)
@@ -35,7 +35,7 @@ public class DeclarationEngine {
   private int fLastSignificantToken;
 
   private IFile fFile;
-  private String fFileName;
+//  private String fFileName;
 
   /**
    * Creates the template engine for a particular context type.
@@ -47,11 +47,11 @@ public class DeclarationEngine {
 
     fLastSignificantToken = lastSignificantToken;
     fFile = file;
-    if (fFile != null) {
-      fFileName = fFile.getFullPath().toString();
-    } else {
-      fFileName = "";
-    }
+//    if (fFile != null) {
+//      fFileName = fFile.getFullPath().toString();
+//    } else {
+//      fFileName = "";
+//    }
   }
 
   /**
@@ -128,9 +128,15 @@ public class DeclarationEngine {
               if (type != PHPIdentifierLocation.METHOD && type != PHPIdentifierLocation.VARIABLE) {
                 continue; // for loop
               }
-              if (!fFileName.equals(location.getFilename())) {
+              break;
+            case ITerminalSymbols.TokenNamethis_PHP_COMPLETION:
+              if (type != PHPIdentifierLocation.METHOD && type != PHPIdentifierLocation.VARIABLE) {
                 continue; // for loop
               }
+              // check all filenames of the subclasses
+//              if (!fFileName.equals(location.getFilename())) {
+//                continue; // for loop
+//              }
               break;
             case ITerminalSymbols.TokenNamenew :
               if (type != PHPIdentifierLocation.CLASS && type != PHPIdentifierLocation.CONSTRUCTOR) {