Re: [aspectj-users] Can advice in AspectJ consume and use OSGI services?

2010-06-29 Thread Andrew Eisenberg
> Is it possible to use an OSGI service in the advice of an aspect? It requires > a BundleContext to use a service, which I have always gotten from an > Activator. Should I make my Aspect into a bundle? I am lost of how to tackle > this problem as of now :( No. Bundle activators and aspects ha

[aspectj-users] Can advice in AspectJ consume and use OSGI services?

2010-06-29 Thread Kashtan, Daniel
Hey all, Is it possible to use an OSGI service in the advice of an aspect? It requires a BundleContext to use a service, which I have always gotten from an Activator. Should I make my Aspect into a bundle? I am lost of how to tackle this problem as of now :( My goal is to hide the cross-cuttin

Re: [aspectj-users] aspectJ big example!!

2010-06-29 Thread Ramnivas Laddad
If you are looking for bigger aspects, take a look at examples from the second edition of AspectJ in Action (http://manning.com/laddad2). Also take a look at the Spring project (its transaction management and domain-object dependency injection aspects are fairly involved). If you are looking at Ja

Re: [aspectj-users] Dynamically disable a pointcut

2010-06-29 Thread Ramnivas Laddad
If indeed isTraceEnabled is set to 'false', your pointcut will not select anything and you shouldn't get any tracing. Try printing isTraceEnabled in your advice to see if it has been set to 'true'. -Ramnivas On Tue, Jun 29, 2010 at 8:37 AM, rampaadh wrote: > > I am new user to AspectJ Programmi

RE: [aspectj-users] RE: Aspect for clicking on a JButton

2010-06-29 Thread Kashtan, Daniel
Thanks for your help Andy, you are correct about it being null sometimes and other times not. I was not thinking about how AspectJ would interact with the actionPerformed method completely. It ends up getting called by in two spots in my program when I hit my commit button and it does not have a

Re: [aspectj-users] RE: Aspect for clicking on a JButton

2010-06-29 Thread Andy Clement
As I say, only 'sometimes' it is null, other times it isn't null and you get what you expect... Andy On 29 June 2010 12:17, Kashtan, Daniel wrote: > It must be, but I am confused by how I get the print out of "Commit clicked" > at all. > > From: aspectj-

RE: [aspectj-users] RE: Aspect for clicking on a JButton

2010-06-29 Thread Kashtan, Daniel
It must be, but I am confused by how I get the print out of "Commit clicked" at all. From: aspectj-users-boun...@eclipse.org [aspectj-users-boun...@eclipse.org] On Behalf Of Andy Clement [andrew.clem...@gmail.com] Sent: Tuesday, June 29, 2010 3:12 PM To: a

Re: [aspectj-users] RE: Aspect for clicking on a JButton

2010-06-29 Thread Andy Clement
I'd suspect that sometimes getActionCommand() is returning null when called on the ActionEvent. Andy On 29 June 2010 12:00, Kashtan, Daniel wrote: > So I got something almost working. I am not sure whether my pointcut or > advice are causing the problem. It works, but I get some weird exception

[aspectj-users] RE: Aspect for clicking on a JButton

2010-06-29 Thread Kashtan, Daniel
So I got something almost working. I am not sure whether my pointcut or advice are causing the problem. It works, but I get some weird exception after it works :( after(ActionEvent e) : args(e) && execution(void java.awt.event.ActionListener+.actionPerformed(ActionEvent)) {

Auto Reply: Re: Auto Reply: [aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: Auto Reply: [aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread Andy Clement
trying to get it sorted now. Sorry to everyone for the spam. Andy On 29 June 2010 08:44, Jim McMaster wrote: > Could an administrator unsubscribe this moron?  I don't care that he is out > of the office. > > Jim McMaster > mailto:jim.mcmas...@gmail.com > > > On Tue, Jun 29, 2010 at 9:32 AM, wr

Auto Reply: Re: Auto Reply: [aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: Auto Reply: [aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread Jim McMaster
Could an administrator unsubscribe this moron? I don't care that he is out of the office. Jim McMaster mailto:jim.mcmas...@gmail.com On Tue, Jun 29, 2010 at 9:32 AM, wrote: > I am out of office right now. Will be back on 5th July. > > ___ > aspectj-

[aspectj-users] Dynamically disable a pointcut

2010-06-29 Thread rampaadh
I am new user to AspectJ Programming. I am writing a custom aspect to trace method entry and exit points. I have a pointcut and a boolean variable isTraceEnabled to control it. -- private static boolean isTraceEnabled = false; pointcut traceMethods(): if (isTraceEnable

Auto Reply: [aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

[aspectj-users] Re: Dynamically disable a pointcut

2010-06-29 Thread rampaadh
-- View this message in context: http://aspectj.2085585.n4.nabble.com/Dynamically-disable-a-pointcut-tp2268621p2272357.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org http

Auto Reply: [aspectj-users] Aspect for clicking on a JButton

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

[aspectj-users] Aspect for clicking on a JButton

2010-06-29 Thread Kashtan, Daniel
Hey all, I am having a hard time trying to figure out how to make a pointcut that can trigger when a JButton is clicked. Also, would I be able to target specific buttons being clicked? What can I do? This e-mail and any files transmitted with it may be proprietary and are intended solely for t

Re: [aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread David Bosschaert
Cool - thanks Martin, I'll have a look into Equinox Weaving! David On 29 June 2010 15:20, Martin Lippert wrote: > Hi David! > > You should take a look at Equinox Weaving: > > http://www.eclipse.org/equinox/incubator/aspects (but this doc is quite old > and out-of-date, sorry) > > Using Equinox W

Auto Reply: Re: [aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread Martin Lippert
Hi David! You should take a look at Equinox Weaving: http://www.eclipse.org/equinox/incubator/aspects (but this doc is quite old and out-of-date, sorry) Using Equinox Weaving you can put aspects into bundles and let the runtime take care of weaving these aspects into other bundles. You don't

Auto Reply: Auto Reply: [aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

Auto Reply: [aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread santhosh . thatipally
I am out of office right now. Will be back on 5th July. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users

[aspectj-users] How to dynamically attach an aspect to a OSGi bundle being installed?

2010-06-29 Thread David Bosschaert
Hi all, I have a question about the use of AspectJ & OSGi bundles in Equinox. * I have a management bundle that monitors bundles being installed. * When a new bundle gets installed, I would like the possibility to attach an aspect to that bundle. Certain parameters to this aspect depend on some h