Community
Participate
Working Groups
Having the need to programmatically add aspectj nature to a project (I'm developing an eclipse plugin) I found AJDTUtils.addAspectjProjectNature method that exactly does what I need to do. Unfortunately the class is in an internal package of ajdt. My request is to make this method public and, since I need to do this operation and wait till it completes, I also want to request the addition of another public method that simply calls internal_addAspectJNature synchronously. Thanks, Luca Zenti.
I believe one method is sufficient, as the addAspectjProjectNature method *does* wait for the operation to complete. Wrapping it in a WorkspaceModifyOperation just batches up resource changed notifications, rather than spawning a new thread. I propose the new API for AJDT 1.4 to be: org.eclipse.ajdt.ui.AspectJUIPlugin.convertToAspectJProject(IProject project) One issue might be that the internal method can sometimes prompt the user - in the case of a plugin project for example, so this wouldn't be helpful for programmatic use. I guess the public method could just add the nature, and the internal one can do the other stuff. How does that all sound?
Sounds ok, so, i guess, the nature will be configured and the various aspectj related properties will be available before the public method ends, isn't it?
The new API call convertToAspectJProject() is now availabe in the following dev build: 1.4.0.20060222111711 for Eclipse 3.2M5 Build report: AJDT1.4 build.41 Build Successful BUILD COMPLETE - build.41 Date of build: 02/22/2006 11:17:11 Time to build: 18 minutes 14 seconds Last changed: 02/22/2006 11:00:27 Last log entry: 126324: New API: AspectJUIPlugin.convertToAspectJProject()
Done, added API to AspectJUIPlugin: convertToAspectJProject(IProject) and also the reverse operation: convertFromAspectJProject(IProject project)