Thinking more, call() may not work either, since those calls are most likely
in the javax package too. You may have to go for LTW with the option to
weave into javax types. Even this has potential issues (LTW is as good as
the chance it gets to weave in the required types).
-Ramnivas

On Tue, Jul 14, 2009 at 10:40 AM, Ramnivas Laddad
<[email protected]>wrote:

> The problem is that the join points belong to the javax package that you do
> not weave. Try call() pointcut instead of execution().
> -Ramnivas
>
> On Tue, Jul 14, 2009 at 9:52 AM, FraGMenT <[email protected]> wrote:
>
>> Hello.
>>
>>
>> Hello, I want to execute some code using aspectj before any element of the
>> UI is drawn.
>>
>> To do that, I define the following pointcut:
>>
>> pointcut gonnaBeDrawn() :
>> execution(public void java.awt.Component+.repaint()) ||
>> execution(public void java.awt.Component+.update(Graphics))||
>> execution(public void java.awt.Component+.paint(Graphics))||
>> execution(public void java.awt.Component+.paintAll(Graphics));
>>
>> Then the advice:
>>
>> before() : gonnaBeDrawn()
>> {
>> System.out.println("Component drawn!");
>> }
>>
>> As far as I know this should do the work, but I don't get any expected
>> message on the console. I get the following warning at compile time though.
>>
>> *advice defined in main.Prueba has not been applied
>> [Xlint:adviceDidNotMatch]* (The file's name is main.Prueba.aj)
>>
>> Other aspects are working fine, so I think it's not a problem of
>> environment configuration.
>> What am I doing wrong? Do I need to do *Load Time Weaving* or something?
>>
>>
>> Thanks for your time! ^^'
>>
>> _______________________________________________
>> aspectj-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to