Accessing "Configure-"-> "Converting toMaven Project" from plugin [message #1234711] |
Wed, 22 January 2014 11:38  |
Eclipse User |
|
|
|
Hello Forum,
I try to create a "New Project Wizard" which will create a eclipse project with Maven nature, whilst also creating stubb classes as well as a default package structure.
However, I am able to obtain the information from the user, create a pom file as well as a folder structure. But I have problems to determine, how I can enable the project nature... In eclipse, I can do this by "Configure-"-> "Converting toMaven Project".
Is there a possibility to access this functionality out of the plugin?
And more generall: Is there an easy/good way to determine, which functionality is introduced by which plugin/extension to eclipse?
|
|
|
Re: Accessing "Configure-"-> "Converting toMaven Project" from plugin [message #1234981 is a reply to message #1234711] |
Thu, 23 January 2014 04:24  |
Eclipse User |
|
|
|
For an example how to add a nature to a project you may want to look at JDT/UI's org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.configureJavaProject(String, IProgressMonitor)
However, m2e does more than that when you invoke "Convert to Maven Project". I suggest you checkout the sources of m2e and search for calls (direct or indirect) to org.eclipse.core.internal.resources.Project.setDescription(IProjectDescription, IProgressMonitor). That should direct you towards the code you want to invoke.
HTH,
Stephan
|
|
|
Powered by
FUDForum. Page generated in 0.02499 seconds