Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How add builder to the nature in this situation?
How add builder to the nature in this situation? [message #523997] Tue, 30 March 2010 08:50 Go to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
Hi,all:

The situation is this:
First our project has its own nature, and the nature with no builders at all. And customers use it for a long time, create many projects with that nature.

But now we add a builder to that nature, the builder build the project to some format. So the customer's old project has the nature but without the new builder. We do not want the custormer edit the .project file one by one.

So how do we add the builder to the project in background? Does eclipse has some function can do this easily?

Thanks~
Re: How add builder to the nature in this situation? [message #524008 is a reply to message #523997] Tue, 30 March 2010 09:56 Go to previous messageGo to next message
popjxc is currently offline popjxcFriend
Messages: 36
Registered: March 2010
Member
Now I create a popup menu to add builder to the project, not so good I think...
Re: How add builder to the nature in this situation? [message #524334 is a reply to message #523997] Wed, 31 March 2010 14:39 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Write a small upgrade plugin and use org.eclipse.ui.startup to run an
org.eclipse.ui.IStartup class. iterate over the projects, look for your
nature, and add your builder if it is not there from a
org.eclipse.core.resources.WorkspaceJob

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Move External Tools Menu Items to Toolbar?
Next Topic:Command Binding Scheme
Goto Forum:
  


Current Time: Sat Jul 27 09:55:21 GMT 2024

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

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

Back to the top