Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Load-time weaving with Eclipse RCP application

Hello,

I posted this problem to eclipse.technology.aspectj and I was suggested to post
it here:

I want to use load-time weaving with an Eclipse RCP Application and
the -javaagent:aspectweaver.jar option but it doesn'nt work as it should.

I start the application with

java -javaagent:%ASPECTJ_HOME%\lib\aspectweaver.jar
  org.eclipse.core.launcher.Main

My aop.xml looks like this:

<aspectj>
 <aspects>
   <aspect name="util.logging.LoggingAspect"/>
 </aspects>
 <weaver options=" -nowarn">
   <include within="rcpdemo.*"/>
</weaver>
</aspectj>


My aspect generates an output before any method call. This works fine for
simple java applications but not for RCP applications. Allthough I get a lot
of messages that classes are going to be woven (e. g.
WeavingAdaptor.weaveClass org/eclipse/ui/internal/PerspectiveHelper) the
desired output from the aspect does not appear.

When I change the 'include within' attribute of aop.xml to "*" I get the
same WeavingAdaptor messages and additional output from my aspect. But the
aspect does not create output from method calls within any plugin. The
output appears only for method calls within the eclipse launcher in the
startup.jar.

I know about the AJEER plugin but it works only with the AJDT 1.1.12 which
are available for Eclipse 3.0. But is there any possibility to use load-time
weaving with RCP applications developed with Eclipse 3.1 and upcoming
versions?

Regards, Stephan


Back to the top