From 21dc11ccadbb301c13aae0b26a0e9b1178cd0dd5 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 5 Jan 2005 16:39:28 +0000 Subject: [PATCH] BWD: Use new API on sourcetypebinding to remember original type hierarchy and don't put out weaving messages for decp. --- .../compiler/lookup/AjLookupEnvironment.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java index 8306dd120..98d57e8d2 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java @@ -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); } -- 2.39.5