Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [ajdt-dev] Parameter Annotations in Pointcuts

Hi Eric and Andy,

Thank you for your quick response!

It is true: I do not get an error message from AJDT. I am using Eclipse 3.3.2 with AJDT 1.5.2 and have also tried with the latest AJDT development release.

As I want to write a generic aspect I will have to write quite a number of pointcuts. Only stopping when my fingers start bleeding :-)

Therefore I am looking forward for your "construct".

Heiko 

-----Ursprüngliche Nachricht-----
Von: ajdt-dev-bounces@xxxxxxxxxxx [mailto:ajdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von Andy Clement
Gesendet: Mittwoch, 7. Mai 2008 17:28
An: ajdt-dev@xxxxxxxxxxx
Betreff: Re: [ajdt-dev] Parameter Annotations in Pointcuts

Eric is right, you cannot use '..' twice in a pointcut like that - I'm
surprised you don't get an error message for trying.

So, this does mean at the moment you have to write multiple pointcuts
if you want to match at multiple locations.

execution(* test(@Try (*),..))
execution(* test(*,@Try (*),..))
execution(* test(*,*,@Try (*),..))

We are thinking about a construct that would get around requiring this
but haven't finished the design yet.

cheers,
Andy.


2008/5/7 Eric Bodden <eric.bodden@xxxxxxxxxxxxxx>:
> Hi Heiko.
>
>  to my best knowledge "execution(* test(.., @Try (*), ..))" is not a
>  valid pointcut because usually you cannot have two times ".." in the
>  same pattern (although this is quite a silly restriction I often
>  find). So I guess there's a typecheck missing there that should give
>  you an error message.
>
>  Eric
>
>  2008/5/7 Heiko Seeberger <Heiko.Seeberger@xxxxxxxxxxxxx>:
>
>
> > Hi,
>  >
>  >  I really enjoy the pointcut matching based on parameter annotations.
>  >  Great work!
>  >
>  >  I wonder why the pointcut in the following advice won't match:
>  >
>  >  before() : execution(* test(.., @Try (*), ..)) {
>  >     System.err.println("ParamAnno aspect was here!");
>  >  }
>  >
>  >  Whereas the following will match:
>  >
>  >  before() : execution(* test(@Try (*), ..)) {
>  >     System.err.println("ParamAnno aspect was here!");
>  >  }
>  >
>  >  The method that should be affected by the above advices is:
>  >
>  >  public void test(@Try String s, String s2) {
>  >     // Do nothing!
>  >  }
>  >
>  >  Is this a bug or a feature :-)
>  >
>  >  Heiko
>  >  _______________________________________________
>  >  ajdt-dev mailing list
>  >  ajdt-dev@xxxxxxxxxxx
>  >  https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>  >
>
>
>
>  --
>  Eric Bodden
>  Sable Research Group
>  McGill University, Montréal, Canada
>
>
> _______________________________________________
>  ajdt-dev mailing list
>  ajdt-dev@xxxxxxxxxxx
>  https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev


Back to the top