]> source.dussan.org Git - aspectj.git/commitdiff
BWD: Use new API on sourcetypebinding to remember original type hierarchy and don...
authoraclement <aclement>
Wed, 5 Jan 2005 16:39:28 +0000 (16:39 +0000)
committeraclement <aclement>
Wed, 5 Jan 2005 16:39:28 +0000 (16:39 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java

index 8306dd12030d6c4f108e26832bcf63a61cefaba8..98d57e8d2e8235dd4e333fd83439db9ed824c648 100644 (file)
@@ -24,6 +24,15 @@ import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
 import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
 import org.aspectj.bridge.IMessage;
 import org.aspectj.bridge.WeaveMessage;
+import org.aspectj.weaver.AsmRelationshipProvider;
+import org.aspectj.weaver.ConcreteTypeMunger;
+import org.aspectj.weaver.ResolvedTypeMunger;
+import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.WeaverStateInfo;
+import org.aspectj.weaver.World;
+import org.aspectj.weaver.bcel.LazyClassGen;
+import org.aspectj.weaver.patterns.DeclareParents;
 import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
@@ -39,15 +48,6 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
-import org.aspectj.weaver.AsmRelationshipProvider;
-import org.aspectj.weaver.ConcreteTypeMunger;
-import org.aspectj.weaver.ResolvedTypeMunger;
-import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.TypeX;
-import org.aspectj.weaver.WeaverStateInfo;
-import org.aspectj.weaver.World;
-import org.aspectj.weaver.bcel.LazyClassGen;
-import org.aspectj.weaver.patterns.DeclareParents;
 
 /**
  * Overrides the default eclipse LookupEnvironment for two purposes.
@@ -460,13 +460,15 @@ public class AjLookupEnvironment extends LookupEnvironment {
        private void addParent(SourceTypeBinding sourceType, ResolvedTypeX parent) {
                ReferenceBinding parentBinding = (ReferenceBinding)factory.makeTypeBinding(parent); 
                
+        sourceType.rememberTypeHierarchy();
                if (parentBinding.isClass()) {
                        sourceType.superclass = parentBinding;
-                       
+
+            // this used to be true, but I think I've fixed it now, decp is done at weave time!                        
                        // TAG: WeavingMessage    DECLARE PARENTS: EXTENDS
                        // Compiler restriction: Can't do EXTENDS at weave time
                        // So, only see this message if doing a source compilation
-                       reportDeclareParentsMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSEXTENDS,sourceType,parent);
+                   // reportDeclareParentsMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSEXTENDS,sourceType,parent);
                        
                } else {
                        ReferenceBinding[] oldI = sourceType.superInterfaces;
@@ -484,9 +486,10 @@ public class AjLookupEnvironment extends LookupEnvironment {
                        warnOnAddedInterface(factory.fromEclipse(sourceType),parent);
                        
 
+            // this used to be true, but I think I've fixed it now, decp is done at weave time!                        
                        // TAG: WeavingMessage    DECLARE PARENTS: IMPLEMENTS
                        // This message will come out of BcelTypeMunger.munge if doing a binary weave
-                       reportDeclareParentsMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS,sourceType,parent);
+               // reportDeclareParentsMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS,sourceType,parent);
                        
                }