Problem adding aspect to a plugin project programatically [message #65784] |
Fri, 16 June 2006 01:43  |
Eclipse User |
|
|
|
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 06:46  |
Eclipse User |
|
|
|
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 06:46  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02832 seconds