Skip to main content


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 08:47 Go to next message
Nikhil chulli is currently offline Nikhil chulliFriend
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 06:38 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
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 12:49 Go to previous message
Sabir pasha is currently offline Sabir pashaFriend
Messages: 70
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: Thu Apr 25 22:54:49 GMT 2024

Powered by FUDForum. Page generated in 0.03442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top