Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ/AJDT in Eclipse-Plugin-Projects - where's my mistake?

Hello, I am developing an Eclipse-Plugin and I want to use AspectJ for some "aspects". There seems to be a problem doing this the simple way. I tried the following (Latest Stable Eclipse 3.0.0/AJDT ):

1. Create a Plugin-Project using the wizard
2. Select the "Hello, World"-Template
2.1 Run (Runtime Workbench) => Works
3. Right-click on project and choose "Convert to AJDT Project"
3.1 Run => Works
4. Add a simple aspect to the main package, sth. like that:

package aj_hello_plug;


public aspect TraceAspect {

	pointcut staticCalls()
		: call(* Aj_hello_plugPlugin.*(..));

	before() : staticCalls() {
		System.out.println("Call to " + thisJoinPoint);
	}
}

4.1 Run => Does not work (Error log see below)

What a I missing? I tried some more things like adding the rt-jar to classpath and so on but it just won't work. Any help is appreciated. It would be very nice to have AspectJ at hand while developing plug-ins.

Regards,
Jens


Error-Log:

Error Jun 30, 2004 22:30:27.618 Plug-in aj_hello_plug was unable to load class aj_hello_plug.actions.SampleAction.
java.lang.ClassNotFoundException: aj_hello_plug.actions.SampleAction
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
	at [...]

Error Jun 30, 2004 22:30:27.618 Could not create action delegate for id: aj_hello_plug.actions.SampleAction

Error Jun 30, 2004 22:30:27.597 Plug-in aj_hello_plug was unable to load class aj_hello_plug.actions.SampleAction.

? 2004 22:30:27.587 An error occured while automatically activating bundle aj_hello_plug (91). org.osgi.framework.BundleException: The activator aj_hello_plug.Aj_hello_plugPlugin for bundle aj_hello_plug is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:158)




Back to the top