]> source.dussan.org Git - aspectj.git/commitdiff
pipeline changes: changed adviceDidNotMatch processing and moved reweavable message...
authoraclement <aclement>
Fri, 28 Jul 2006 10:22:45 +0000 (10:22 +0000)
committeraclement <aclement>
Fri, 28 Jul 2006 10:22:45 +0000 (10:22 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java

index b38f470e9c32770cbdc04ac67a7dfc5c6c3a4022..feae53d0fcaf792e9ff85a993a00c79f9419a754 100644 (file)
@@ -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) {