Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Loadtime-Weaving for Eclipse Plugins(How do I contribute apsects to Plugins without compiling them?)
Loadtime-Weaving for Eclipse Plugins [message #664892] Tue, 12 April 2011 12:48 Go to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 241
Registered: July 2009
Senior Member
Hi,

I am developing for the EGit/JGit projects at eclipse. I would like to use AJDT to write aspects for the plugins we develop in this project. Ideally I don't want to touch the plugin projects at all - I would like to write aspects in an own Aspect/J project and then start a runtime workbench with aspects for the code in the plugins beeing active. I tried several things which don't work (I don't see the output which the aspects should produce). Is there any step-by-step docu how to use loadtime-weaving when developing eclipse plugins?
To be more specific: How do I launch a runtime-workbench with aspects beeing weaved in which are defined in a seperate project. Does that seperata project needs to be plugin-project/fragment/...?

Ciao
Chris



Ciao
Chris
Re: Loadtime-Weaving for Eclipse Plugins [message #664976 is a reply to message #664892] Tue, 12 April 2011 16:30 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
Because Eclipse is built on OSGi and each Eclipse plugin/bundle uses its own class loader, a standard LTW approach will not work.

You have two possibilities for using AspectJ with OSGi:

1. Each aspect is built in-project and only weaves into classes in the same project. This would require compile time weaving (and a couple of extra lines in your pde build,properties file).
2. Use Equinox weaving (aka Equinox aspects): http://www.eclipse.org/equinox/incubator/aspects/

I think you would best be served by the second approach, even though it is a bit more complicated to configure. There is a quick launch on the website linked above. And also, the latest Equiniox weaving bits can be downloaded from the AJDT update site.
Previous Topic:How to convert a Visio .vsd to Eclipse UML format??
Next Topic:problem loading plugin org.eclipse.equinox.weaving.springweaver
Goto Forum:
  


Current Time: Mon Dec 11 09:41:03 GMT 2017

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

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