The zip file with the projects are accessible from here. https://1drv.ms/u/s!AtUfupFUBjWahS272GhHVxPht1bN
br, //mike ________________________________ Från: aspectj-users-boun...@eclipse.org <aspectj-users-boun...@eclipse.org> för Mikael Petterson <mikaelpetter...@hotmail.com> Skickat: den 14 augusti 2018 13:34 Till: Eric B; aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Debug aspect Hi I tried setting the inline compilation. See here: [cid:66f19f26-8a29-4ca3-9cc3-411742b7a666] But no difference. So I add my projects here as a zip if someone is interested. br, //mike ________________________________ Från: aspectj-users-boun...@eclipse.org <aspectj-users-boun...@eclipse.org> för Eric B <ebenza...@gmail.com> Skickat: den 14 augusti 2018 11:35 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Debug aspect Depending on your aspect, ajc may try to compile in inline in your class. I'm not sure what conditions the compiler checks for inline compilation. The surest way is to use a decompiler to check the output class file and see if you aspect has been inlined or not. If it has, there is an experimental flag you can set in your plugin definition XnoInline (https://www.mojohaus.org/aspectj-maven-plugin/compile-mojo.html#XnoInline). Additionally, if I remember correctly, there is also a setting in ellipse ajdt that configures the same. Thanks, Eric On Tue, Aug 14, 2018, 6:58 AM Mikael Petterson, <mikaelpetter...@hotmail.com<mailto:mikaelpetter...@hotmail.com>> wrote: Just adding a picture of my setup. [X] ________________________________ Från: aspectj-users-boun...@eclipse.org<mailto:aspectj-users-boun...@eclipse.org> <aspectj-users-boun...@eclipse.org<mailto:aspectj-users-boun...@eclipse.org>> för Mikael Petterson <mikaelpetter...@hotmail.com<mailto:mikaelpetter...@hotmail.com>> Skickat: den 14 augusti 2018 08:46 Till: aspectj-users@eclipse.org<mailto:aspectj-users@eclipse.org> Ämne: [aspectj-users] Debug aspect Hi, I have an application A in Eclipse that uses another library that has an aspect implemented. Purpose of of aspect is to see when application A calls deprecated methods in the library. Both application A and library are java maven projects in Eclipse. Application A has a dependency to the library and I can see that in Eclipse. So I have the source available for both projects. In eclipse the library is also a aspect project so I can see when it builds it output saying "woven class". What I want to accomplish is , when I run a class in application A that calls a deprecated method in the library, I want the debugger to halt in my aspect. Here is where I set my breakpoint: pointcut deprecated() : @annotation(Deprecated) && (call(public * *(..)) || call(*.new(..))); pointcut beta() : @annotation(com.google.common.annotations.Beta); pointcut deprecatedMethods() : deprecated() && !beta(); before() : deprecatedMethods() { DeprecatedMethodData deprecatedMethodData = new DeprecatedMethodData(); System.out.println( "Deprecated method " + thisJoinPoint.getSignature() + " called by " + thisEnclosingJoinPointStaticPart.getSignature()); deprecatedMethodData.setDeprecatedClassName(thisJoinPoint.getSignature().toString()); deprecatedMethodData.setCallingClassName(thisEnclosingJoinPointStaticPart.getSignature().toString()); deprecatedMethodData.setAccess(Access.EXTERNAL); deprecatedMethodData.setUser(JavaProperties.USER); deprecatedMethodData.setUserDir(JavaProperties.USER_DIR); deprecationDataList.add(deprecatedMethodData); But there is no halt on: DeprecatedMethodData deprecatedMethodData = new DeprecatedMethodData(); where I put my breakpoint on. Any ideas what I am lacking? br, //mike _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org<mailto:aspectj-users@eclipse.org> To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/aspectj-users