[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] RE: Capturing EventDispatch Thread

Title: Re: [aspectj-users] RE: Capturing EventDispatch Thread

The program is a very large mapping java application (I can't post it). I'm using loadtime (runtime?) weaving through the aop.xml file and the java agent flag. (I'm compiling the aspect completely separately from my code. This is working fine though for other aspects. 

Nowhere in my code am I calling dispatchEvent...I'm assuming any component event would trigger it though. Meaning any swing button press should be caught by this pointcut.

Thanks for your help!
Dan


-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx <aspectj-users-bounces@xxxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx <aspectj-users@xxxxxxxxxxx>
Sent: Mon Jun 04 18:01:44 2007
Subject: Re: [aspectj-users] RE: Capturing EventDispatch Thread

OK, what is the program doing?  Can you provide a small example client.  (Pure Speculation) It might be the case that the library is calling dispatchEvent (i.e., not your code) and the compiler is not weaving into the library ( i.e., it just weaves into what you "compile").


On 6/4/07, Fleck, Dan <Dan_Fleck@xxxxxxx> wrote:

        Hi,

        

        I am trying to capture and time calls to java.awt.EventQueue.dispatchEvent(AWTEvent e).

        

        I am using the following code but it doesn't seem to work. Any ideas why I'm not seeing the events? I added a lot of tries to get it but nothing seemed to work. I do have other aspects that work fine.

        

        Thanks,

        Dan

        

        Code:--- -----------------------------------------------------------------------

        

        @Aspect

        public aspect SluggishDetector {

        

           pointcut dispatchPoint(java.awt.Component p1, java.awt.AWTEvent event):

                                     target(p1) && args(event) &&

                                     (

                                     call(void *.dispatchEvent(java.awt.AWTEvent+)) ||

                                     call(void *.dispatchEvent(java.awt.AWTEvent+)) ||

                                     execution(void *.dispatchEvent(java.awt.AWTEvent+)) ||

                                     execution(void *.dispatchEvent(java.awt.AWTEvent+))

                                     ) ;

        

           before(java.awt.Component p1, java.awt.AWTEvent event): dispatchPoint(p1, event) {

              System.err.println("ASPECTJ ***** SLUGGISH");

           }

        }

        ~   


        _______________________________________________
        aspectj-users mailing list
        aspectj-users@xxxxxxxxxxx
        https://dev.eclipse.org/mailman/listinfo/aspectj-users <https://dev.eclipse.org/mailman/listinfo/aspectj-users>