Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problems with cflow in eclipse

Well, all you are saying is 1.) advise *everything* that is not within
TestAspect but 2.) only if it is in the control flow of fooPC(). The
latter (2.) requires a runtime check because AJDT does not perform a
control flow analysis for obvious reasons. Hence, from a static
(compile-time) point of view this pointcut could match anywhere.

Eric

On 28/05/07, Chrys <zampas@xxxxxxxxx> wrote:

Hello. I am using eclipse 3.2.2 and ajdt1.5.4. I have the following problem
with cflow.
Example:

package controlFlowPointcutsExamples;

public class Test
{
        public static void main(String[] args)
        {
                foo();
        }

        static void foo()
        {

        }
}


package controlFlowPointcutsExamples;
public aspect TestAspect
{
        pointcut fooPC() : execution(void controlFlowPointcutsExamples.Test.foo());

         before() :
                cflow(fooPC())
                && !within(TestAspect)
                {

                }

}

When i try the above example eclipse goes crazy and the before() advice
advises join points in other classes and other packages aswell. Am i doing
something wrong?
--
View this message in context: http://www.nabble.com/Problems-with-cflow-in-eclipse-tf3830336.html#a10843762
Sent from the AspectJ - users mailing list archive at Nabble.com.

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



--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


Back to the top