From: aclement Date: Fri, 28 Jul 2006 10:22:45 +0000 (+0000) Subject: pipeline changes: changed adviceDidNotMatch processing and moved reweavable message... X-Git-Tag: pre_pr_153572~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f3145681eb99bf4a32461a366ab87f1108bd056;p=aspectj.git pipeline changes: changed adviceDidNotMatch processing and moved reweavable message (dont want it for every file woven!) --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index b38f470e9..feae53d0f 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -499,7 +499,12 @@ public class BcelWeaver implements IWeaver { return (sm2.getSourceLocation().getOffset()-sm1.getSourceLocation().getOffset()); } }); - + + if (inReweavableMode) + world.showMessage(IMessage.INFO, + WeaverMessages.format(WeaverMessages.REWEAVABLE_MODE), + null, null); + if (trace.isTraceEnabled()) trace.exit("prepareForWeave"); } @@ -1136,6 +1141,8 @@ public class BcelWeaver implements IWeaver { // bug 119882 - see above comment for bug 113531 ReferenceTypeDelegate theDelegate = ((ReferenceType)theType).getDelegate(); + + // TODO urgh - put a method on the interface to check this, string compare is hideous if (theDelegate.getClass().getName().endsWith("EclipseSourceType")) continue; throw new BCException("Can't find bcel delegate for "+className+" type="+theType.getClass()); @@ -1150,13 +1157,15 @@ public class BcelWeaver implements IWeaver { deletedTypenames = new ArrayList(); - warnOnUnmatchedAdvice(); - requestor.weaveCompleted(); CompilationAndWeavingContext.leavingPhase(weaveToken); if (trace.isTraceEnabled()) trace.exit("weave",wovenClassNames); return wovenClassNames; } + + public void allWeavingComplete() { + warnOnUnmatchedAdvice(); + } /** * In 1.5 mode and with XLint:adviceDidNotMatch enabled, put out messages for any @@ -1213,7 +1222,8 @@ public class BcelWeaver implements IWeaver { if (!(ba.getSignature() instanceof BcelMethod) || !Utility.isSuppressing((AnnotationX[])ba.getSignature().getAnnotations(),"adviceDidNotMatch")) { - world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(),element.getSourceLocation()); + world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(), + new SourceLocation(element.getSourceLocation().getSourceFile(),element.getSourceLocation().getLine()));//element.getSourceLocation()); } } } @@ -1257,10 +1267,6 @@ public class BcelWeaver implements IWeaver { } public void prepareToProcessReweavableState() { - if (inReweavableMode) - world.showMessage(IMessage.INFO, - WeaverMessages.format(WeaverMessages.REWEAVABLE_MODE), - null, null); } public void processReweavableStateIfPresent(String className, BcelObjectType classType) {