Goal
I am building an Eclipse plugin targeting the 3.7 environment and would like to include an aspect in the plugin that provides advice on code that is also in the plugin.
Setup
I have been trying to follow along with the spirit of these guidelines as best I can considering the apparent differences between 3.4 and 3.7: http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php
Here is what I have so far:
- A plugin project with the aspect and some source.
- The plugin project has been converted to an AspectJ project, which triggered Eclipse to automatically add
org.aspectj.runtime (1.6.12)
to the plugin's dependencies. - I checked "Reexport this dependency" on the
org.aspectj.runtime
dependency in my plugin configuration. - I defined the aspect in an aop.xml in my META-INF directory.
- My MANIFEST.MF has an
Export-Package
entry on the package that the aspect is in. - My run configuration includes the following plugins and start levels:
org.eclipse.equinox.weaving.aspectj
(start level of 1)org.eclipse.equinox.weaving.hook
(start level of default which is 4)org.aspectj.runtime
(start level of 1)org.aspectj.weaver
(start level of 1)
Current results
I see lines in the console that look like this, but it appears that this processing occurs the first time each class is classloaded.
[com.my.traceeditor] info processing reweavable type com.my.util.ByteUtil: com\my\util\ByteUtil.java
No advice is being applied. Is it possible the weaver isn't weaving early enough? What to do?