Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Feature suggestions for AJDT


Sergio,

>That's how I do it now.
>Imagine you are developing some tracing aspect with different pointcuts and advices that produce an output into the console, for >instance.
>The output you get is the result from all the advices.
>This, not only makes it difficult to find where are the results from the advice you're working on, but allows other advices, that you're >not expecting, to interfere with the one you're working on.
>On one hand, if you could select only the advice you want to be weaved, you would not only immediately see only the result you're >looking for, but also take for granted that it's not being influenced by any other advice that you're not expecting.
>On the other hand, if alone the result is correct and mixed with other advices not, you could release the remainder advices one by one >until you find the one that's interfeering.
>I think that when you work with composed pointcuts these situations tend to occur.
The problem with a feature that allows you to "disable" advice is that in general this makes no more sense than a feature that allows you to disable a method and its invocation. While tracing aspects continue to work, but put out less information, a more "functional" aspect would simply break and the application might fail. One of the hardest problems for users of AspectJ is determining why their advice is not called. A feature like this would add another possible reason.


If you are concerned about the volume of data produced and trying to find the wood amongst the trees might I suggest some good old fashioned configuration that selectively enables advice.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



"Sérgio Bryton" <sergiobryton@xxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

20/12/2006 19:14

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
Re: [aspectj-users] Feature suggestions for AJDT







On 12/20/06, Matt Chapman <mpchapman@xxxxxxxxx> wrote:
Hi Sérgio,
Interesting suggestions... see my comments below.

On 19/12/06, Sérgio Bryton <
sergiobryton@xxxxxxxxx> wrote:
> 1. For debug purposes, I think it would be nice to be able to select the
> advices that we do not want to be executed.

I haven't heard that idea before. You can currently exclude entire
aspects (right-click, Build Path > Exclude, just like with classes)
but there is no specific mechanism for excluding individual advice
statements. I guess you could comment out the advice - selecting it,
then pressing Control-/ is fairly quick.


That's how I do it now.
Imagine you are developing some tracing aspect with different pointcuts and advices that produce an output into the console, for instance.
The output you get is the result from all the advices.
This, not only makes it difficult to find where are the results from the advice you're working on, but allows other advices, that you're not expecting, to interfere with the one you're working on.
On one hand, if you could select only the advice you want to be weaved, you would not only immediately see only the result you're looking for, but also take for granted that it's not being influenced by any other advice that you're not expecting.
On the other hand, if alone the result is correct and mixed with other advices not, you could release the remainder advices one by one until you find the one that's interfeering.
I think that when you work with composed pointcuts these situations tend to occur.



> 2. When we select an advice we can see the joinpoints advised by it. It
> would also be nice to see the joinpoints captured by a selected pointcut.

It was originally thought that it might be too confusing to try to
show both, at least in the same way. There has been some work done on
a possible "pointcut matcher" tool. Currently you can just create an
empty advice block for a pointcut, and then see the matches in the
usual way. So I think such a tool would need to offer some additional
benefit, such as somehow making it easier to write pointcuts for
example...



I agree. How about package explorer / ctrl+left button click to select joinpoints / right button click / aspectj / define pointcut ?


--Matt
_______________________________________________
aspectj-users mailing list

aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



--
Sérgio Bryton
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top