mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 01:06:01 +02:00
Follow-up for the fix for [Bug 162143] [MBS] Internal builder forgets about deltas when failures occur
This commit is contained in:
parent
c5f3842ca8
commit
3127a209e4
1 changed files with 18 additions and 8 deletions
|
@ -875,17 +875,17 @@ public class CommonBuilder extends ACBuilder {
|
|||
try {
|
||||
int flags = 0;
|
||||
IResourceDelta delta = getDelta(currentProject);
|
||||
|
||||
if(delta != null){
|
||||
flags = BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS;
|
||||
// delta = getDelta(currentProject);
|
||||
}
|
||||
|
||||
boolean buildIncrementaly = delta != null;
|
||||
|
||||
BuildStateManager bsMngr = BuildStateManager.getInstance();
|
||||
IProjectBuildState pBS = bsMngr.getProjectBuildState(currentProject);
|
||||
IConfigurationBuildState cBS = pBS.getConfigurationBuildState(cfg.getId(), true);
|
||||
|
||||
// if(delta != null){
|
||||
flags = BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS;
|
||||
// delta = getDelta(currentProject);
|
||||
// }
|
||||
|
||||
boolean buildIncrementaly = delta != null;
|
||||
|
||||
IBuildDescription des = BuildDescriptionManager.createBuildDescription(cfg, cBS, delta, flags);
|
||||
|
||||
DescriptionBuilder dBuilder = null;
|
||||
|
@ -1454,6 +1454,16 @@ public class CommonBuilder extends ACBuilder {
|
|||
|
||||
protected void clean(CfgBuildInfo bInfo, IProgressMonitor monitor) throws CoreException{
|
||||
if (shouldBuild(CLEAN_BUILD, bInfo.getBuilder())) {
|
||||
BuildStateManager bsMngr = BuildStateManager.getInstance();
|
||||
IProject project = bInfo.getProject();
|
||||
IConfiguration cfg = bInfo.getConfiguration();
|
||||
IProjectBuildState pbs = bsMngr.getProjectBuildState(project);
|
||||
IConfigurationBuildState cbs = pbs.getConfigurationBuildState(cfg.getId(), false);
|
||||
if(cbs != null){
|
||||
pbs.removeConfigurationBuildState(cfg.getId());
|
||||
bsMngr.setProjectBuildState(project, pbs);
|
||||
}
|
||||
|
||||
boolean performExternalClean = true;
|
||||
if(shouldCleanProgrammatically(bInfo)){
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue