[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] AJDT and inpath
|
Hi,
I did what you and detailed information about the waving appears but
nothing about the external jar file.
The aspect just pointcuts the execution of a method of a clas in the jar
file
########################################################
public aspect AspectHelloWorld {
pointcut helloWorldJarFile(): execution (public void
HelloWorld.printHelloWorld());
void around():helloWorldJarFile(){
System.out.println("Hello world from the aspect");
}
}
#########################################################
But if I instantiate in a main method the class HelloWorld and calls
printHelloWorld, the waving does not catches the execution, but if I
change the pointcut definition and put "call" instead of execution, the
weaving works.
The jarfile is added in the "AspectJ InPath" project property
--alf
Matt Chapman wrote:
Alfonso Olias Sanz <aolias@xxxxxxxx> wrote on 20/09/2004 09:45:29:
I want to wave into a third party library (mylibrary.jar) and I have
added mylibrary.jar into the InPath section. When I wave the code I just
not see anything in the outline view that tells me I have really
crosscutted that library.
I have created a Foolish class that extends from the class I want to
crosscut (the one in mylibrary.jar) and overrides the target method.
Then If I wave the code, the Foolish class appears in the outline view.
Is this alright?, that third party classes do not appear into the
outline view of an aspect? but they are really waved. Or am I doing
something wrong?
This is probably working correctly. The way to tell for sure is to
right-click on your project, go to the "AspectJ" property page, and select
the "Output weaving info messages to problem view" option (added in AJDT
1.1.11). Now rebuild your project, and check the problem view. You should
see an entry for each time the compiler weaves something, for example:
Type 'mainPackage.MainClass' (MainClass.java:17) advised by before
advice from 'tracing.Trace' (Trace.aj:20)
Unfortunately AJDE doesn't receive this information, so the outline view
doesn't show when an inpath jar is woven into.
Regards,
Matt.
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.
The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail