Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » PDE Eclipse Application and Equinox Weaving AspectJ(Running aspects with bundles)
PDE Eclipse Application and Equinox Weaving AspectJ [message #1759146] Thu, 06 April 2017 23:31 Go to next message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 44
Registered: October 2012

I am trying to run aspects when some methods are called by the application. I followed a lot of tutorials spread in the internet but they are too old so I do not know if they are still correct.

Ok this is what I have in my project


Where RE and UI are eclipse applications developed with SWT. So, to lunch the application the user chose a java project with the second button of the mouse and run my application by means a menu. The utils project is a plug-in that contains my aspects and target application has all bundles needed in order to execute properly my application.

The manifest of utils (containing the aspects) is the following:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Utils
Bundle-SymbolicName: br.ufscar.SaS.utils
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: lib/BaseX853.jar,

The aspect that I am trying to execute is the following:

import org.eclipse.emf.ecore.resource.Resource;

public aspect AddReturn {

	pointcut callCreateKDM(): call(private void createKDMFile(Resource, String));
	after() : callCreateKDM() {
		System.out.println("It works!");

And the code that I want to crosscut is the following :

//Generates the KDM file
			createKDMFile(javaResource, javaProjectName);
		} catch (IOException e) {e.printStackTrace();}

I performed all the configurations needed, for example,




Then I try to run it, and in the console these messages are shown:


So I think all is correct.

Then I run the application:


And the message "It works" must appear after the method is called, but nothing occurs,

Please help me because I am stuck in this several days.

Thank you,

  • Attachment: 1.png
    (Size: 18.44KB, Downloaded 277 times)
  • Attachment: 2.png
    (Size: 44.12KB, Downloaded 275 times)
  • Attachment: 3.png
    (Size: 28.43KB, Downloaded 264 times)
  • Attachment: 4.png
    (Size: 19.17KB, Downloaded 254 times)
  • Attachment: 5.png
    (Size: 75.60KB, Downloaded 289 times)
Re: PDE Eclipse Application and Equinox Weaving AspectJ [message #1759212 is a reply to message #1759146] Sat, 08 April 2017 03:15 Go to previous message
Daniel San Martín is currently offline Daniel San MartínFriend
Messages: 44
Registered: October 2012

I got it!, it was a stupid error, in Eclipse-SupplementBundle, I wrote the package name instead of the bundle Razz

Thank you!.
Previous Topic:Odd StackMap error with 1.8.9 and wrapping new calls
Next Topic:Aspect not getting detected by Apache Tomcat 8.5.x
Goto Forum:

Current Time: Wed Feb 19 19:51:29 GMT 2020

Powered by FUDForum. Page generated in 0.01401 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top