Quick disclaimer: I am running Eclipse 3.5 and I cannot upgrade to a more recent version. I really do not want anyone to construe this as disrespectful, but please do not ask me why.
I would like to know what is the best (and kosher) way to share a single .aj aspect file among multiple eclipse plug-ins that comprise a single stand-alone RCP application.
I have seen a number of examples where a single plug-in contains an .aj aspect file in one of its packages. But I am guessing that there has to be a better way than for each plug-in project to bear its own identical .aj copy.
Isn’t there a way to “centralize” the .aj file and then reference it from each plug-in project?
If I understand correctly, you want to have an aspect that is applied in several bundles?
It should work simply packaging that aspect in a bundle, and the using
Require-Bundlefrom all the bundles that need it (Import-Packageshould work as well). If you need more fine-grained control, you can useapply-aspects:=trueorfalse, for example adding this in yourMETA-INF/MANIFEST.MF:Make sure you list your aspects in
META-INF/aop.xmlor else they won’t be executed.