[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Load-time weaving into Eclipse plug-ins
|
Hello,
I'd like to weave a compiled aspect into classes that belong to Eclipse
plug-ins (executed inside of an Eclipse workbench). I start the workbench
like so:
CP=/home/jploski/eclipse-3.2.1/startup.jar
CP=$CP:/home/jploski/workspace-3.2/tpmon1-ant/external-libs/aspectjlib.jar
CP=$CP:/home/jploski/workspace-3.2/tpmon1-ant/external-libs/aspectjrt.jar
CP=$CP:/home/jploski/workspace-3.2/tpmon1-ant/external-libs/aspectjtools.jar
CP=$CP:/home/jploski/workspace-3.2/tpmon1-ant/external-libs/mysql-connector-java-5.1.5-bin.jar
CP=$CP:/home/jploski/workspace-3.2/tpmon1-ant/dist/tpmonLTW.jar
/usr/local/jdk1.6.0_02/bin/java \
-Dorg.aspectj.weaver.showWeaveInfo=true \
-Daj.weaving.verbose=true \
-javaagent:/home/jploski/workspace-3.2/tpmon1-ant/external-libs/aspectjweaver.jar
\
-ea -Xmx256M \
-classpath $CP \
org.eclipse.core.launcher.Main \
-launcher /home/jploski/eclipse-3.2.1/eclipse \
-name Eclipse \
-showsplash 600 \
-product org.eclipse.sdk.ide \
-data /home/jploski/workspace-3.2.debug \
-configuration
file:/home/jploski/workspace-3.2/.metadata/.plugins/org.eclipse.pde.core/Runtime
Workbench/ \
-dev
file:/home/jploski/workspace-3.2/.metadata/.plugins/org.eclipse.pde.core/Runtime
Workbench/dev.properties \
-pdelaunch -os linux -ws gtk -arch x86
In the console output, I can see several classes being instrumented, but
then there are messages such as:
[StartupClassLoader@34ab7a] info AspectJ Weaver Version DEVELOPMENT built
on Thursday Feb 28, 2008 at 22:30:47 GMT
[StartupClassLoader@34ab7a] info register classloader
org.eclipse.core.launcher.Main$StartupClassLoader@34ab7a
[StartupClassLoader@34ab7a] info no configuration found. Disabling weaver
for class loader org.eclipse.core.launcher.Main$StartupClassLoader@34ab7a
[DefaultClassLoader@93a0d8] info AspectJ Weaver Version DEVELOPMENT built
on Thursday Feb 28, 2008 at 22:30:47 GMT
[DefaultClassLoader@93a0d8] info register classloader
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@93a0d8
[DefaultClassLoader@93a0d8] info no configuration found. Disabling weaver
for class loader
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@93a0d8
[DefaultClassLoader@e523ed] info AspectJ Weaver Version DEVELOPMENT built
on Thursday Feb 28, 2008 at 22:30:47 GMT
[DefaultClassLoader@e523ed] info register classloader
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@e523ed
[DefaultClassLoader@e523ed] info no configuration found. Disabling weaver
for class loader
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@e523ed
...
Accordingly, the classes of my plug-in are not instrumented at all.
How can I enable weaving for these additional class loaders? Better yet,
how do I configure weaving so that any loaded class is instrumented if it
matches the name pattern, regardless of which class loader it came from?
Regards,
Jan Ploski