Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Scope of Aspect Defined in Fragment
Scope of Aspect Defined in Fragment [message #600709] Wed, 04 November 2009 10:40
No real name is currently offline No real name
Messages: 2
Registered: July 2009
Junior Member
Hi there,

in an Eclipse-RCP application I have defined an aspect in a fragment and want it to match joinpoints in the the fragment host bundle. This, however does not seem to work. If I move the aspect to the host bundle, everything works fine. Both host and fragment have an aspectj nature. Now I wonder if this is a principal limitation or if I got something wrong.

For those interested - the context is the following: I keep the JUnit tests for the host bundle in the fragment. The RCP application makes heavy use of jobs and this quite often causes trouble in unit tests, because some tests depend on the result of jobs and I have to artificially make them wait for the jobs to finish. So I thought, I could write an aspect which matches the Job.schedule() method and uses an around advice to block this method and instead run the Job in the main thread. This works fine, when the aspect is living in the host bundle (which again is bad because then it is deployed into the application unless I use ugly things like system properties to block/activate it).

Thanks for any help :)
tarek
Previous Topic:Method with Aspect getting called twice
Next Topic:ITD scope
Goto Forum:
  


Current Time: Wed Jul 23 06:01:00 EDT 2014

Powered by FUDForum. Page generated in 0.04678 seconds