|Scope of Aspect Defined in Fragment [message #600709]
||Wed, 04 November 2009 15:40
| No real name
Registered: July 2009
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 :)
Powered by FUDForum
. Page generated in 0.02509 seconds