Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Adding a Nature/Builder automatically to a project(I have created a plugin with a Nature and Builder. If I have to use it in a project I have to right click on that project and choose the option "Add/Remove 'MyNatureName' Nature". On choosin)
Adding a Nature/Builder automatically to a project [message #892690] Fri, 29 June 2012 04:47 Go to next message
Nikhil chulli is currently offline Nikhil chulli
Messages: 9
Registered: June 2012
Junior Member
I have created a plugin with a Nature and Builder. If I have to use it in a project I have to right click on that project and choose the option "Add/Remove 'MyNatureName' Nature". On choosing this option my Builder will get added/associated with that project.
If I want to add the Nature automatically(not by choosing the option "Add/Remove 'MyNatureName' Nature"), what all things should I be doing?
Re: Adding a Nature/Builder automatically to a project [message #893185 is a reply to message #892690] Tue, 03 July 2012 02:38 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 29.06.2012 10:47, Nikhil chulli wrote:
> I have created a plugin with a Nature and Builder. If I have to use it
> in a project I have to right click on that project and choose the
> option "Add/Remove 'MyNatureName' Nature". On choosing this option my
> Builder will get added/associated with that project.
> If I want to add the Nature automatically(not by choosing the option
> "Add/Remove 'MyNatureName' Nature"), what all things should I be doing?
See
org.eclipse.core.resources.IProject.getDescription()
org.eclipse.core.resources.IProjectDescription.setNatureIds(String[])

Dani
Re: Adding a Nature/Builder automatically to a project [message #899310 is a reply to message #893185] Tue, 31 July 2012 08:49 Go to previous message
Sabir Mising name is currently offline Sabir Mising name
Messages: 68
Registered: February 2010
Member
you have use this method during your project creation
project.setNatureId(yournatureid);


Previous Topic:HOW to add a default .java file while creating projects of my own nature
Next Topic:How to provide default "Type filter"
Goto Forum:
  


Current Time: Wed Jul 30 15:33:56 EDT 2014

Powered by FUDForum. Page generated in 0.01448 seconds