Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Programmatically set Auto build on save on


Actually, look at the property behavior dialog. It has a reference to this global workspace option I wrote about. Global option works together with this project (or configuration which is more correct). option. If global option is ON and project option is off, IDE doesn't build the project when you save resource (but  still build if you save configuration). So, what I offer you also works if you are talking about temporary blocking "build on save" option. 
Looking to the code, I think that correct implementation on the project level (if you don't like to manipulate global option) should go this way:
Project -> Configuration -> ToolChain -> IBuilder -> setAutoBuildEnable

Alex

On 30/01/2009 1:11 PM, Patxi Gortázar wrote:
Yes, I want to set the project CDT auto build option (Project>Properties>C/C++ Build>Behaviour tab>Build on resource save (Auto build) ) per project.

On Fri, Jan 30, 2009 at 6:07 PM, Elena Laskavaia <elaskavaia@xxxxxxx> wrote:
It is not auto build on save and not per project. This is workspace autobuild.

Alex Chapiro wrote:
       IWorkspace  ws= YourPlugin.getWorkspace();
       IWorkspaceDescription wsd = ws.getDescription();
       wsd.setAutoBuilding(true);
       ws.setDescription(wsd);


On 30/01/2009 11:43 AM, Patxi Gortázar wrote:
Hi,

I'm implementing a new language based on CDT and I need to set the property "Auto build on save" on automatically for new projects. How can I do it programmatically? I have extended the CDTCommonProjectWizard, defining my own project wizard, and I'm trying to set this property in the continueCreation() method, but I don't know

a) if this is the correct way to do so
b) how can I obtain an IEditableBuilder to set the "auto build on save" property (as you do in the BuildBehaviourTab class)

Also, I wonder whether this could be specified in my projectType extension point (maybe in the buildProperties property).

Thanks,
Patxi.
------------------------------------------------------------------------

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
 


------------------------------------------------------------------------


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top