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 9977f9d254e..56798e31210 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 @@ -1023,7 +1023,19 @@ public abstract class CBuildConfiguration extends PlatformObject * @since 6.5 */ @Override - public void refreshScannerInfo() throws CoreException { + public void setActive() { + try { + refreshScannerInfo(); + } catch (CoreException e) { + // do nothing + } + } + + /** + * @since 6.5 + * @throws CoreException + */ + protected void refreshScannerInfo() throws CoreException { // do nothing by default } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/ICBuildConfiguration2.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/ICBuildConfiguration2.java index 87dfea69ba3..9471777548d 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/ICBuildConfiguration2.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/ICBuildConfiguration2.java @@ -10,16 +10,14 @@ *******************************************************************************/ package org.eclipse.cdt.core.build; -import org.eclipse.core.runtime.CoreException; - /** * @since 6.5 */ public interface ICBuildConfiguration2 { /** - * Refresh the Scanner info + * Mark the Build Configuration as active */ - void refreshScannerInfo() throws CoreException; + void setActive(); } 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 14c211fefe5..1be74304114 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 @@ -115,8 +115,7 @@ public class CoreBuildLaunchBarTracker implements ILaunchBarListener { } if (buildConfig == null) { - for (IToolChain tc : tcs) { - IToolChain toolChain = tcs.iterator().next(); + for (IToolChain toolChain : tcs) { buildConfig = configManager.getBuildConfiguration(finalProject, toolChain, mode.getIdentifier(), monitor); if (buildConfig != null) { @@ -131,8 +130,8 @@ public class CoreBuildLaunchBarTracker implements ILaunchBarListener { IProjectDescription desc = finalProject.getDescription(); desc.setActiveBuildConfig(buildConfig.getBuildConfiguration().getName()); finalProject.setDescription(desc, monitor); - // build config has changed so Scanner Info may change too which would affect indexing - ((ICBuildConfiguration2)buildConfig).refreshScannerInfo(); + // notify the active build config that it is active + ((ICBuildConfiguration2)buildConfig).setActive(); } }