Careful AspectJ Aspects Included in the Eclipse 3.7 Plugin Project

goal

I am creating an Eclipse plugin oriented to environment 3.7, and would like to include in the plugin an aspect that contains code tips, which is also in the plugin.

Customization

I tried to follow the spirit of these recommendations as far as I can see the obvious differences between 3.4 and 3.7: http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php

Here is what I still have:

  • A plugin project with an aspect and some source.
  • The plug-in project was converted to an AspectJ project, which launched Eclipse to automatically add org.aspectj.runtime (1.6.12) to the plug-in dependencies.
  • I checked "Reexport this dependency" depending on org.aspectj.runtime in my plugin configuration.
  • I defined the aspect in aop.xml in my META-INF directory.
  • My MANIFEST.MF has an Export-Package entry on the package that contains the aspect.
  • My launch configuration includes the following plugins and entry levels:
    • org.eclipse.equinox.weaving.aspectj (entry level 1)
    • org.eclipse.equinox.weaving.hook (default entry level is 4)
    • org.aspectj.runtime (entry level 1)
    • org.aspectj.weaver (entry level 1)

Current results

I see lines in the console that look like this, but it seems that this processing happens the first time each class is run.

[com.my.traceeditor] info processing reweavable type com.my.util.ByteUtil: com\my\util\ByteUtil.java

No advice is applicable. Is it possible that the weaver does not weave for too long? What to do?

+4
source share
1 answer

When you write an aspect that should be applied in only one set, you do not need equinox weaving. This only applies to weaving. You can remove the dependency on weaving plug-ins until you make sure your package uses compilation in time.

+1
source

All Articles