Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Problem adding aspect to a plugin project programatically
Problem adding aspect to a plugin project programatically [message #65784] Fri, 16 June 2006 05:43 Go to next message
Eclipse UserFriend
Originally posted by: sbederml.gmail.com

Hi,

I have three questions. I would appreciate if you could help me.

1. I'm using eclipse 3.2RC4. After changing a plugin project's class
path programmatically using IJavaProject.setRawClasspah method,
MANIFEST.MF file still contains the old classpath information under its
Bundle-ClassPath item. What can I do in order to solve this problem?

2. I wrote some code that changes the MANIFEST.MF file to contain the
new classpath information, but still the project contain an error until
I manually (from the the gui) change MANIFEST.MF a bit and press "Save".
How can I can make the project respond to changes of MANIFEST.MF file?

3. How can I add and remove AspectJ nature of a project, without being
prompted by dialog windows regarding AspectJ settings?

Thank you in advance,

Michael
Re: Problem adding aspect to a plugin project programatically [message #65806 is a reply to message #65784] Fri, 16 June 2006 10:46 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Michael Beder wrote:
> 1. I'm using eclipse 3.2RC4. After changing a plugin project's class
> path programmatically using IJavaProject.setRawClasspah method,
> MANIFEST.MF file still contains the old classpath information under its
> Bundle-ClassPath item. What can I do in order to solve this problem?

Manifest files are a feature of plug-ins projects and are therefore
handled by PDE. So to update MANIFEST.MF you need to use api from PDE.
Unfortunately I don't know of public api to do this - in AJDT we use
internal api for the manifest editor (which is why the manifest editor
opens when you convert a plug-in project).

> 2. I wrote some code that changes the MANIFEST.MF file to contain the
> new classpath information, but still the project contain an error until
> I manually (from the the gui) change MANIFEST.MF a bit and press "Save".
> How can I can make the project respond to changes of MANIFEST.MF file?

You could try obtaining the MANIFEST.MF file as an IResource then
calling refreshLocal() on it.

> 3. How can I add and remove AspectJ nature of a project, without being
> prompted by dialog windows regarding AspectJ settings?

Use the following public api in org.eclipse.ajdt.ui:
AspectJUIPlugin.convertToAspectJProject(project)
AspectJUIPlugin.convertFromAspectJProject(project)

Regards,

Matt.
Re: Problem adding aspect to a plugin project programatically [message #594167 is a reply to message #65784] Fri, 16 June 2006 10:46 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Michael Beder wrote:
> 1. I'm using eclipse 3.2RC4. After changing a plugin project's class
> path programmatically using IJavaProject.setRawClasspah method,
> MANIFEST.MF file still contains the old classpath information under its
> Bundle-ClassPath item. What can I do in order to solve this problem?

Manifest files are a feature of plug-ins projects and are therefore
handled by PDE. So to update MANIFEST.MF you need to use api from PDE.
Unfortunately I don't know of public api to do this - in AJDT we use
internal api for the manifest editor (which is why the manifest editor
opens when you convert a plug-in project).

> 2. I wrote some code that changes the MANIFEST.MF file to contain the
> new classpath information, but still the project contain an error until
> I manually (from the the gui) change MANIFEST.MF a bit and press "Save".
> How can I can make the project respond to changes of MANIFEST.MF file?

You could try obtaining the MANIFEST.MF file as an IResource then
calling refreshLocal() on it.

> 3. How can I add and remove AspectJ nature of a project, without being
> prompted by dialog windows regarding AspectJ settings?

Use the following public api in org.eclipse.ajdt.ui:
AspectJUIPlugin.convertToAspectJProject(project)
AspectJUIPlugin.convertFromAspectJProject(project)

Regards,

Matt.
Previous Topic:Problem adding aspect to a plugin project programatically
Next Topic:Problem with adding AspectJ nature to imported plugin
Goto Forum:
  


Current Time: Thu Apr 18 14:28:26 GMT 2024

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

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

Back to the top