A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / QualifiedThisReference.java
index 5dd3156..0d8c060 100644 (file)
@@ -18,79 +18,83 @@ import net.sourceforge.phpdt.internal.compiler.lookup.ReferenceBinding;
 import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding;
 
 public class QualifiedThisReference extends ThisReference {
-       
+
        public TypeReference qualification;
+
        ReferenceBinding currentCompatibleType;
-       
-       public QualifiedThisReference(TypeReference name, int sourceStart, int sourceEnd) {
+
+       public QualifiedThisReference(TypeReference name, int sourceStart,
+                       int sourceEnd) {
                super(sourceStart, sourceEnd);
                qualification = name;
                this.sourceStart = name.sourceStart;
        }
 
-       public FlowInfo analyseCode(
-               BlockScope currentScope,
-               FlowContext flowContext,
-               FlowInfo flowInfo) {
+       public FlowInfo analyseCode(BlockScope currentScope,
+                       FlowContext flowContext, FlowInfo flowInfo) {
 
                return flowInfo;
        }
 
-       public FlowInfo analyseCode(
-               BlockScope currentScope,
-               FlowContext flowContext,
-               FlowInfo flowInfo,
-               boolean valueRequired) {
+       public FlowInfo analyseCode(BlockScope currentScope,
+                       FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
 
                return flowInfo;
        }
 
        /**
         * Code generation for QualifiedThisReference
-        *
-        * @param currentScope net.sourceforge.phpdt.internal.compiler.lookup.BlockScope
-        * @param codeStream net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
-        * @param valueRequired boolean
+        * 
+        * @param currentScope
+        *            net.sourceforge.phpdt.internal.compiler.lookup.BlockScope
+        * @param codeStream
+        *            net.sourceforge.phpdt.internal.compiler.codegen.CodeStream
+        * @param valueRequired
+        *            boolean
         */
-//     public void generateCode(
-//             BlockScope currentScope,
-//             CodeStream codeStream,
-//             boolean valueRequired) {
-//
-//             int pc = codeStream.position;
-//             if (valueRequired) {
-//                     if ((bits & DepthMASK) != 0) {
-//                             Object[] emulationPath =
-//                                     currentScope.getEmulationPath(this.currentCompatibleType, true /*only exact match*/, false/*consider enclosing arg*/);
-//                             codeStream.generateOuterAccess(emulationPath, this, this.currentCompatibleType, currentScope);
-//                     } else {
-//                             // nothing particular after all
-//                             codeStream.aload_0();
-//                     }
-//             }
-//             codeStream.recordPositionsFrom(pc, this.sourceStart);
-//     }
-
+       // public void generateCode(
+       // BlockScope currentScope,
+       // CodeStream codeStream,
+       // boolean valueRequired) {
+       //
+       // int pc = codeStream.position;
+       // if (valueRequired) {
+       // if ((bits & DepthMASK) != 0) {
+       // Object[] emulationPath =
+       // currentScope.getEmulationPath(this.currentCompatibleType, true /*only
+       // exact match*/, false/*consider enclosing arg*/);
+       // codeStream.generateOuterAccess(emulationPath, this,
+       // this.currentCompatibleType, currentScope);
+       // } else {
+       // // nothing particular after all
+       // codeStream.aload_0();
+       // }
+       // }
+       // codeStream.recordPositionsFrom(pc, this.sourceStart);
+       // }
        public TypeBinding resolveType(BlockScope scope) {
 
                constant = NotAConstant;
                this.resolvedType = qualification.resolveType(scope);
-               if (this.resolvedType == null) return null;
+               if (this.resolvedType == null)
+                       return null;
 
                // the qualification MUST exactly match some enclosing type name
                // Its possible to qualify 'this' by the name of the current class
                int depth = 0;
                this.currentCompatibleType = scope.referenceType().binding;
                while (this.currentCompatibleType != null
-                       && this.currentCompatibleType != this.resolvedType) {
+                               && this.currentCompatibleType != this.resolvedType) {
                        depth++;
-                       this.currentCompatibleType = this.currentCompatibleType.isStatic() ? null : this.currentCompatibleType.enclosingType();
+                       this.currentCompatibleType = this.currentCompatibleType.isStatic() ? null
+                                       : this.currentCompatibleType.enclosingType();
                }
-               bits &= ~DepthMASK; // flush previous depth if any                      
+               bits &= ~DepthMASK; // flush previous depth if any
                bits |= (depth & 0xFF) << DepthSHIFT; // encoded depth into 8 bits
 
                if (this.currentCompatibleType == null) {
-                       scope.problemReporter().noSuchEnclosingInstance(this.resolvedType, this, false);
+                       scope.problemReporter().noSuchEnclosingInstance(this.resolvedType,
+                                       this, false);
                        return this.resolvedType;
                }
 
@@ -106,9 +110,7 @@ public class QualifiedThisReference extends ThisReference {
                return qualification.toString(0) + ".this"; //$NON-NLS-1$
        }
 
-       public void traverse(
-           ASTVisitor visitor,
-               BlockScope blockScope) {
+       public void traverse(ASTVisitor visitor, BlockScope blockScope) {
 
                if (visitor.visit(this, blockScope)) {
                        qualification.traverse(visitor, blockScope);