Bug 126324 - make AJDTUtils.addAspectjProjectNature method public
Summary: make AJDTUtils.addAspectjProjectNature method public
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 1.3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.4.0 M1   Edit
Assignee: Matt Chapman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-03 05:47 EST by Luca Zenti CLA
Modified: 2006-03-06 09:04 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Zenti CLA 2006-02-03 05:47:39 EST
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.
Comment 1 Matt Chapman CLA 2006-02-03 12:10:31 EST
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?
Comment 2 Luca Zenti CLA 2006-02-03 12:43:05 EST
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?
Comment 3 Matt Chapman CLA 2006-02-22 11:52:57 EST
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()
Comment 4 Matt Chapman CLA 2006-03-06 09:04:49 EST
Done, added API to AspectJUIPlugin:

convertToAspectJProject(IProject)

and also the reverse operation:

convertFromAspectJProject(IProject project)