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.
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:
org.aspectj.runtime (1.6.12)
to the plugin's dependencies.org.aspectj.runtime
dependency in my plugin configuration.Export-Package
entry on the package that the aspect is in.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)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?
When you are writing an aspect that is only to be applied in the same bundle, then you don't need equinox weaving. That is only for cross-bundle weaving. You can remove the dependency on the weaving plugins as long as you make sure that your bundle is using compile-time weaving.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With