]> source.dussan.org Git - aspectj.git/commitdiff
141556#11 - reworked messagehandler with 'ignore' function! (wooo) - hope Matthew...
authoraclement <aclement>
Fri, 25 Aug 2006 09:50:32 +0000 (09:50 +0000)
committeraclement <aclement>
Fri, 25 Aug 2006 09:50:32 +0000 (09:50 +0000)
24 files changed:
ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
bridge/src/org/aspectj/bridge/CountingMessageHandler.java
bridge/src/org/aspectj/bridge/IMessageHandler.java
bridge/src/org/aspectj/bridge/MessageUtil.java
bridge/src/org/aspectj/bridge/MessageWriter.java
bridge/src/org/aspectj/bridge/context/PinpointingMessageHandler.java
loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/TestMessageHolder.java
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
testing-client/testsrc/org/aspectj/testing/TesterTest.java
testing/src/org/aspectj/testing/run/RunStatus.java
tests/java5/ataspectj/MessageHandler.java
weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java
weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
weaver/testsrc/org/aspectj/weaver/tools/PointcutParserTest.java

index ce984ab33d95d57b5dd333c99d918e30ec0108c9..eb5f9cfb6be5b932c59f15ff153becb2000d8166 100644 (file)
@@ -50,7 +50,6 @@ public class CompilerAdapter {
     private BuildNotifierAdapter currNotifier = null;
        private boolean initialized = false;
        private boolean structureDirty = true;
-    private boolean showInfoMessages = false;
     // set to false in incremental mode to re-do initial build
        private boolean nextBuild = false; 
        
@@ -58,14 +57,7 @@ public class CompilerAdapter {
                super();
        }
 
-    public void showInfoMessages(boolean show) { // XXX surface in GUI
-        showInfoMessages = show;
-    }
-    public boolean getShowInfoMessages() {
-        return showInfoMessages;
-    }
-
-    public void nextBuildFresh() {
+       public void nextBuildFresh() {
         if (nextBuild) {
             nextBuild = false;
         }
@@ -616,15 +608,15 @@ public class CompilerAdapter {
 
                public MessageHandlerAdapter() {
                        this.taskListManager = Ajde.getDefault().getTaskListManager();
+                       ignore(IMessage.INFO);
                }       
 
                public boolean handleMessage(IMessage message) throws AbortException {
             IMessage.Kind kind = message.getKind(); 
             if (kind == IMessage.ABORT) return handleAbort(message);
-            if (isIgnoring(kind) 
-                || (!showInfoMessages && IMessage.INFO.equals(kind))) {
+            if (isIgnoring(kind)) {
                     return true;
-                }
+            }
                        
                        taskListManager.addSourcelineTask(message);
                        return true;// return super.handleMessage(message); // also store...    
@@ -641,6 +633,9 @@ public class CompilerAdapter {
        }
        
        public IMessageHandler getMessageHandler() {
+               if (messageHandler == null) {
+                       init();
+               }
                return messageHandler;
        }
 
index 80cda993dc0c7e0ec8b0b73b33d4b6319e166a90..3d4937de6a5417861580082d0a1fb646d04e8849 100644 (file)
@@ -74,7 +74,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelFirstCompile() {
                if (debugTests) System.out.println("\n\n\ntestCancelFirstCompile: Building with LoadsaCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                BuildProgMon programmableBPM = new BuildProgMon();
 
                programmableBPM.cancelOn("compiled:",1); // Force a cancel after the first compile occurs
@@ -105,7 +104,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelThirdCompile() {
                if (debugTests) System.out.println("\n\n\ntestCancelThirdCompile: Building with LoadsaCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                BuildProgMon programmableBPM = new BuildProgMon();
 
                programmableBPM.cancelOn("compiled:",3); // Force a cancel after the third compile occurs
@@ -135,7 +133,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelFirstAspectWeave() {
                if (debugTests) System.out.println("\n\n\ntestCancelFirstAspectWeave: Building with LoadsaCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                BuildProgMon programmableBPM = new BuildProgMon();
 
                programmableBPM.cancelOn("woven aspect ",1); // Force a cancel after the first weave aspect occurs
@@ -163,7 +160,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelThirdAspectWeave() {
                if (debugTests) System.out.println("\n\n\ntestCancelThirdAspectWeave: Building with LoadsaCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                
                BuildProgMon programmableBPM = new BuildProgMon();
                // Force a cancel after the third weave occurs.
@@ -207,7 +203,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelFirstClassWeave() {
                if (debugTests) System.out.println("testCancelFirstClassWeave: Building with EvenMoreCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                BuildProgMon programmableBPM = new BuildProgMon();
 
                programmableBPM.cancelOn("woven class",1); 
@@ -248,7 +243,6 @@ public class BuildCancellingTest extends AjdeTestCase {
        public void testCancelSecondClassWeave() {
                if (debugTests) System.out.println("testCancelSecondClassWeave: Building with EvenMoreCode.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(false);
                BuildProgMon programmableBPM = new BuildProgMon();
 
                programmableBPM.cancelOn("woven class",2); 
index d2e95da66cfd3fd261a711dc548307d0d54d4775..0153630c2f4f176f9ec6aaf42da90c8c0fbbfde3 100644 (file)
@@ -19,6 +19,7 @@ import java.util.List;
 import java.util.Set;
 
 import org.aspectj.ajde.internal.CompilerAdapter;
+import org.aspectj.bridge.IMessage;
 import org.aspectj.util.FileUtil;
 
 public class ReweavableTestCase extends AjdeTestCase {
@@ -77,7 +78,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testNonReweavableCompile() {
                if (debugTests) System.out.println("testNonReweavableCompile: Building with NonReweavable1.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("NonReweavable1.lst").getAbsolutePath(),new BPM(),false);
        
                assertFalse("Did not expect to find a message about the weaver operating in reweavable mode",
@@ -115,7 +116,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testReweavableCompile() {
                if (debugTests) System.out.println("testReweavableCompile: Building with Reweavable1.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
        
                assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -162,7 +163,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testReweavableCompressCompile() {
                if (debugTests) System.out.println("testReweavableCompressCompile: Building with ReweavableCompress1.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("ReweavableCompress1.lst").getAbsolutePath(),new BPM(),false);
        
                assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -222,7 +223,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testReweavableSimpleCompile() {
                if (debugTests) System.out.println("testReweavableSimpleCompile: Building with Reweavable1.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
        
                assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -276,7 +277,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testForReweavableSimpleErrorCompile() {
                if (debugTests) System.out.println("testForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
        
                assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -332,7 +333,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testErrorScenario2Compile() {
                if (debugTests) System.out.println("testErrorScenario2: Building with TJP1.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
+               compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
        
                assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -364,7 +365,7 @@ public class ReweavableTestCase extends AjdeTestCase {
        public void testWorkingScenario2Compile() {
                if (debugTests) System.out.println("testWorkingScenario2: Building with TJP1.lst");
                        compilerAdapter = new CompilerAdapter();
-                       compilerAdapter.showInfoMessages(true);
+                       compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
                        compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
        
                        assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
index 528654a9b5f81201ba45ce8fefc4bcdbed90ae41..57a5fcaaf9a796a990b13cd168d1aca9881aca02 100644 (file)
@@ -106,7 +106,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesAdvice() {
                if (debugTests) System.out.println("testWeaveMessagesAdvice: Building with One.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("One.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("advice",true);
        }
@@ -120,7 +119,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesITD() {
                if (debugTests) System.out.println("\ntestWeaveMessagesITD: Building with Two.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Two.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("itd",true);
        }
@@ -132,7 +130,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesDeclare() {
                if (debugTests) System.out.println("\ntestWeaveMessagesDeclare: Building with Three.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Three.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("declare1",true);         
        }
@@ -144,7 +141,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesDeclareExtends() {
                if (debugTests) System.out.println("\ntestWeaveMessagesDeclareExtends: Building with Four.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Four.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("declare.extends",true);          
        }
@@ -155,7 +151,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesDeclareSoft() {
                if (debugTests) System.out.println("\ntestWeaveMessagesDeclareSoft: Building with Five.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Five.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("declare.soft",true);             
        }
@@ -167,7 +162,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
                if (!LangUtil.is15VMOrGreater()) return; // annotation classes won't be about pre 15
                if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Six.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Six.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("declare.annotation",true);               
        }
@@ -178,7 +172,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
        public void testWeaveMessagesDeclareAnnotationWeaveInfoOff() {
                if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Seven.lst");
                compilerAdapter = new CompilerAdapter();
-               compilerAdapter.showInfoMessages(true);
                compilerAdapter.compile((String) openFile("Seven.lst").getAbsolutePath(),new BPM(),false);
                verifyWeavingMessages("declare.annotationNoWeaveInfo",true);            
        }
index 5c8c080fb2e9744ac62f0cd6479c49932fee5f35..52d759678fe168669600b9ba5464b501956daafd 100644 (file)
@@ -75,6 +75,15 @@ public class CountingMessageHandler implements IMessageHandler {
         delegate.dontIgnore(kind);
     }
 
+    /**
+     * Delegate
+     * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+     * @param kind
+     */
+       public void ignore(IMessage.Kind kind) {
+               delegate.ignore(kind);
+       }
+    
     /** @return delegate.toString() */
     public String toString() {
         return delegate.toString();
@@ -149,4 +158,5 @@ public class CountingMessageHandler implements IMessageHandler {
        if (proxy != null) proxy.reset();
        counters.clear();
     }
+
 }
index 1c3beb9f39db6f9ba029000f5045c41a1e69d096..f09eae26eaaeb8f500e6fff68e838ff2fa3ac8fc 100644 (file)
@@ -52,6 +52,8 @@ public interface IMessageHandler {
             public void dontIgnore(IMessage.Kind kind) {
                 ;
             }
+                       public void ignore(IMessage.Kind kind) {
+                       }
                };
 
        /** 
@@ -77,4 +79,11 @@ public interface IMessageHandler {
      * @param kind
      */
     void dontIgnore(IMessage.Kind kind);
+    
+    /**
+     * Allow fine grained configuration after initialization. 
+     *  
+     * @param kind
+     */
+    void ignore(IMessage.Kind kind);
 }
index 1b75c00411b957aca8a717a890c6d4197c9154ac..db089f618b5c937f32ac8a76713afe52cbc1da05 100644 (file)
@@ -369,6 +369,8 @@ public class MessageUtil {
             public void dontIgnore(IMessage.Kind kind) {
                 ;
             }
+                       public void ignore(Kind kind) {
+                       }
         };
         return visitMessages(holder, selector, true, false);
     }
@@ -599,6 +601,9 @@ public class MessageUtil {
             String text = message.getMessage();
             return ((null != message) && (-1 != text.indexOf(infix)));
         }
+
+               public void ignore(Kind kind) {
+               }
     }
 
     // ------------------ components to render  messages
index 0c3422ecc10782d9467f268197437252c49741fd..ab3fc259a51916a57a88464d24b644ccb6cbf16a 100644 (file)
@@ -68,6 +68,14 @@ public class MessageWriter implements IMessageHandler {
         ;
     }
 
+    /**
+     * No-op
+     * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+     * @param kind
+     */
+       public void ignore(IMessage.Kind kind) {
+       }
+
     /** @return null to not print, or message rendering (including newlines) */
     protected String render(IMessage message) {
         return message.toString();    
index 2f13f85cff1503726f39c7a702b1bef5cccf3d2b..d9465c3229070ed45335b6d30b9c69824d19af23 100644 (file)
@@ -67,6 +67,14 @@ public class PinpointingMessageHandler implements IMessageHandler {
        public void dontIgnore(Kind kind) {
                delegate.dontIgnore(kind);
        }
+
+
+       /* (non-Javadoc)
+        * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+        */
+       public void ignore(Kind kind) {
+               delegate.ignore(kind);
+       }
        
        private static class PinpointedMessage implements IMessage {
 
index c9b4a6d9f568dcc43d2f1576d0f42f2773d6314f..df06ee77300aec9bcd08ec22b4830fa7e0012329 100644 (file)
@@ -60,4 +60,14 @@ public class DefaultMessageHandler implements IMessageHandler {
         }
     }
 
+       public void ignore(IMessage.Kind kind) {
+        if (kind.equals(IMessage.WEAVEINFO)) {
+            showWeaveInfo = false;
+        } else if (kind.equals(IMessage.DEBUG)) {
+            isVerbose = false;
+        } else if (kind.equals(IMessage.WARNING)) {
+            showWarn = true;
+        }
+       }
+
 }
index 4b2c82c13affd22b0cbcb2dfa65f7df1ae8cb802..9db0feb3d4561c8c4d2016b3c609d178e42d9aad 100644 (file)
@@ -122,15 +122,11 @@ public class BuildArgParser extends Main {
                        // Now jump through firey hoops to turn them on/off
                        if (handler instanceof CountingMessageHandler) {
                                IMessageHandler delegate = ((CountingMessageHandler)handler).delegate;
-                               // Without dontIgnore() on the IMessageHandler interface, we have to do this *blurgh*
-                               if (delegate instanceof MessageHandler) {
-                                       if (swi) 
-                                         ((MessageHandler)delegate).dontIgnore(IMessage.WEAVEINFO);
-                                       else 
-                                         ((MessageHandler)delegate).ignore(IMessage.WEAVEINFO);
-                               }
+                               if (swi) 
+                                 delegate.dontIgnore(IMessage.WEAVEINFO);
+                               else 
+                                 delegate.ignore(IMessage.WEAVEINFO);
                        }
-                       
             
             boolean incrementalMode = buildConfig.isIncrementalMode()
                || buildConfig.isIncrementalFileMode();
index a57c61f1a6659b871133710e50e3b2d14412d597..b4feb146a51bea1d5338d4be5b87f86f1f04f54e 100644 (file)
@@ -152,6 +152,14 @@ public class WeaverMessageHandler implements IMessageHandler {
         ;
     }
 
+    /**
+     * No-op
+     * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+     * @param kind
+     */
+       public void ignore(Kind kind) {
+       }
+    
        private int getStartPos(ISourceLocation sLoc,CompilationResult result) {
                int pos = 0;
                if (sLoc == null) return 0;
@@ -234,5 +242,6 @@ public class WeaverMessageHandler implements IMessageHandler {
                IProblem[] retValue = (IProblem[])ret.toArray(new IProblem[]{});
                return retValue;
        }
+
 }
 
index 953085151b88b3ec175a026ef716e00533eb768c..737d696cfff7490ce5bc9756103da08ad31ef0c0 100644 (file)
@@ -240,7 +240,10 @@ public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFacto
          */
         public void dontIgnore(IMessage.Kind kind) {
             ;
-       }
+        }
+
+               public void ignore(Kind kind) {
+               }
        
        }
        
index 5c5d4dd9eb6bcb98e65b2fabd792f1124672b459..a4eba9dcf9a50beb2ee761bcb356799c2ed7a926 100644 (file)
@@ -33,6 +33,7 @@ import org.aspectj.bridge.MessageHandler;
 import org.aspectj.bridge.MessageUtil;
 import org.aspectj.bridge.ReflectionFactory;
 import org.aspectj.bridge.Version;
+import org.aspectj.bridge.IMessage.Kind;
 import org.aspectj.bridge.context.CompilationAndWeavingContext;
 import org.aspectj.util.FileUtil;
 import org.aspectj.util.LangUtil;
@@ -657,6 +658,14 @@ public class Main {
                 return null;
             }
         }
+
+        /**
+         * No-op
+         * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+         * @param kind
+         */
+               public void ignore(Kind kind) {
+               }
     }
     
        public static class LogModeMessagePrinter extends MessagePrinter {
index 2d0e1ba6d70975f08cf7cc6ea217fd84943663d6..5f4d217ec9e22b6fa1cdc8cfcc7d5da7043adbc0 100644 (file)
@@ -529,4 +529,7 @@ class AbortInterceptor implements IMessageHandler {
 
        public void dontIgnore(Kind kind) {
        }
+
+       public void ignore(Kind kind) {
+       }
 }
index a4a99b09980cc16246000ce495963c57fce6cdd9..1e0551f2d26a098e7dc0a24ea9de115e3a2a1e7c 100644 (file)
@@ -89,4 +89,11 @@ public class TestMessageHolder implements IMessageHolder {
 
        }
 
+       /* (non-Javadoc)
+        * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+        */
+       public void ignore(Kind kind) {
+               // TODO Auto-generated method stub
+       }
+
 }
index 62034beb8fd4fdd46f0adb53185a7823b0b13738..8a48f550ea01503b372f04a712ac25f2a681d2fa 100644 (file)
@@ -2112,6 +2112,12 @@ private static class AntMessageHandler implements IMessageHandler {
         */
        public void dontIgnore(Kind kind) {
        }
+
+       /* (non-Javadoc)
+        * @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
+        */
+       public void ignore(Kind kind) {
+       }
        
 }
 }
index 198f4da0b3184c49d3fbfd65fd9c804dc965b479..c2fceb81af99051742b8261f0256c9721dbd9c8d 100644 (file)
@@ -207,11 +207,13 @@ public class TesterTest extends TestCase {
             ;
         }
 
+        public void ignore(IMessage.Kind kind) {
+               }
+
         public boolean handleMessage(IMessage message) {
             (message.isFailed() ? failures : passes).add(message);
             return true;
         }
-
     }
 }                
 //        /**
index 8582bcfc7dad4b99638039297a3b5e18e9ede43e..763cc9103ea1dcfcb5625e5bc7013371c82c8432 100644 (file)
@@ -282,6 +282,10 @@ public class RunStatus implements IRunStatus {
         messageHolder.dontIgnore(kind);
     }
 
+    public void ignore(IMessage.Kind kind) {
+       messageHolder.ignore(kind);
+    }
+    
     /**
         * @see org.aspectj.bridge.IMessageHolder#hasAnyMessage(org.aspectj.bridge.IMessage.Kind, boolean)
         */
index 111b32fc00235d37bc8c2ad7ff49e8291492f3d0..237756c8387931edaa07b1518ed3bdbc35891183 100644 (file)
@@ -24,4 +24,7 @@ public class MessageHandler implements IMessageHandler {
        
     }
        
+    public void ignore(IMessage.Kind kind) {
+       
+    }
 }
\ No newline at end of file
index 96266c23a91f9dbb0081ef855e8af8741fefdc99..7994d8f390cb95a5a2fc0df9ef20cb351d9e0614 100644 (file)
@@ -174,6 +174,10 @@ public class ReflectionWorld extends World implements IReflectionWorld {
                public void dontIgnore(org.aspectj.bridge.IMessage.Kind kind) {
                        // empty
                }
+
+               public void ignore(org.aspectj.bridge.IMessage.Kind kind) {
+                       // empty
+               }
                
        }
 
index 26244e2a0d4d391ee7edf38956b9ffe3e9cd7681..4e4213e199040589ebde5791e4711e7ee8e4c0be 100644 (file)
@@ -523,6 +523,12 @@ public class WeavingAdaptor implements IMessageContext {
                                delegate.dontIgnore(kind);
                        }
                }
+
+               public void ignore(Kind kind) {
+                       if (null != kind) {
+                               delegate.ignore(kind);
+                       }
+               }
                
                private boolean addMessage (IMessage message) {
                        messages.add(message);
@@ -541,6 +547,7 @@ public class WeavingAdaptor implements IMessageContext {
                public void setDelegate (IMessageHandler messageHandler) {
                        delegate = messageHandler;
                }
+
        }
 
        protected class WeavingAdaptorMessageWriter extends MessageWriter {
index b22d306c3954397d77782d8954bfd5862a88ed07..b7a1ef319ed0da677d0df27b65ec3ffdc3b9ed12 100644 (file)
@@ -103,6 +103,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
                }
                public boolean isIgnoring(Kind kind) {return false;}
         public void dontIgnore(IMessage.Kind kind) {;}
+               public void ignore(Kind kind) {}
        }
        
        public void testReferenceToNonAnnotationType() {
index be245c9c3a600bea783ce835b104555b7499a3bf..c1791b24d54367c3744d084a96bbe0d2de9d8cff 100644 (file)
@@ -311,6 +311,9 @@ public class PointcutParserTest extends TestCase {
 
                public void dontIgnore(Kind kind) {
                }
+
+               public void ignore(Kind kind) {
+               }
                
        }
 }