Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330473

Summary: A call to ManagedBuildManager.getConfigurationForDescription() causes recompilation of the project
Product: [Tools] CDT Reporter: Alex Freidin <freidin.alex>
Component: cdt-build-managedAssignee: Project Inbox <cdt-build-managed-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif, zulliger
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch for the problem
none
patch none

Description Alex Freidin CLA 2010-11-17 11:40:24 EST
Build Identifier:  I20090611-1540

Calling to ManagedBuildManager.getConfigurationForDescription() makes the project configuration dirty and a full build is then launched. Specifically, the executable is first cleaned and then rebuilt.
Seems like this is not intentional and there are checks in the code to prevent it, except that some checks are missing.
This happens only if the tools plug-in is using AdditionalInput, e.g. a widget for user objects or libraries input widget in project properties.
When the above call is made, it calls to InputType(ITool parent, String Id, String name, InputType inputType) that creates a copy of a given InputType. This constructor checks "if(copyIds)" to keep the original "rebuild" and "dirty" state, but it is not propagated to InputOrder and AdditionalInput copies that it creates.



Reproducible: Always
Comment 1 Alex Freidin CLA 2010-11-17 11:47:04 EST
Created attachment 183316 [details]
Patch for the problem

My patch keeps the dirty/rebuild state of InputOrder and AdditionalInput object copies, created in this constructor.
Patch is based on CDT_6_0_0 tag version of the file, but the current version 1.31 seems similar.
Comment 2 Alex Freidin CLA 2011-02-26 04:17:28 EST
Created attachment 189879 [details]
patch

Patch for CDT 7.0.1 and HEAD.