From 74e63a90132d04caa1a7ca5dee70c36b9fb6c968 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 16 May 2019 16:43:05 -0400 Subject: [PATCH] Bug 547174 - Clean core project doesn't always show active in console - add missing ProjectDescription.setBuildConfigs calls to CoreBuildLaunchBarTracker, CoreBuildLaunchConfigDelegate and CBuildConfiguration Change-Id: I0d1097d04f3a210a6a7e9f8ad35adb9ba5d7c3d6 --- .../src/org/eclipse/cdt/core/build/CBuildConfiguration.java | 3 ++- .../cdt/debug/core/launch/CoreBuildLaunchBarTracker.java | 4 +++- .../cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java index 1a508884f17..3ac52345458 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2016 QNX Software Systems and others. + * Copyright (c) 2015, 2019 QNX Software Systems and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -298,6 +298,7 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu names.remove(config.getName()); names.add(config.getName()); + projectDesc.setBuildConfigs(names.toArray(new String[0])); projectDesc.setActiveBuildConfig(config.getName()); project.setDescription(projectDesc, monitor); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java index bfa49df989c..f6c98da3799 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 QNX Software Systems and others. + * Copyright (c) 2017, 2019 QNX Software Systems and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -147,6 +147,8 @@ public class CoreBuildLaunchBarTracker implements ILaunchBarListener { // active config last and this will be left in build console for user to see names.remove(buildConfig.getBuildConfiguration().getName()); names.add(buildConfig.getBuildConfiguration().getName()); + + desc.setBuildConfigs(names.toArray(new String[0])); desc.setActiveBuildConfig(buildConfig.getBuildConfiguration().getName()); finalProject.setDescription(desc, monitor); } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java index e255f80cb42..007c39fe546 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2016 QNX Software Systems and others. + * Copyright (c) 2016, 2019 QNX Software Systems and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -158,6 +158,7 @@ public abstract class CoreBuildLaunchConfigDelegate extends LaunchConfigurationT names.remove(buildConfig.getBuildConfiguration().getName()); names.add(buildConfig.getBuildConfiguration().getName()); + desc.setBuildConfigs(names.toArray(new String[0])); desc.setActiveBuildConfig(buildConfig.getBuildConfiguration().getName()); project.setDescription(desc, monitor); }