Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-03-20 19:54:15 +0000
committerJeff Johnston2018-03-20 19:54:15 +0000
commit3e60faaa6c65a031c68a279afa80db3306a3f335 (patch)
treeed83cb80f1e49cfc3939ea4eccf5dbcbb3189060
parentca4d434b0645dbbb89baa61f887d3627aca5f2cc (diff)
downloadorg.eclipse.cdt-3e60faaa6c65a031c68a279afa80db3306a3f335.tar.gz
org.eclipse.cdt-3e60faaa6c65a031c68a279afa80db3306a3f335.tar.xz
org.eclipse.cdt-3e60faaa6c65a031c68a279afa80db3306a3f335.zip
Replace refreshScannerInfo with setActive method
- remove the refreshScannerInfo method from ICBuildConfiguration2 but add it as a protected method of CBuildConfiguration - edit MesonBuildConfiguration and CBuildConfiguratio appropriately - add new setActive method to CBuildConfiguration which calls refreshScannerInfo Change-Id: Iebae09507f24293007a299eea3069451e566a91b
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java14
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/ICBuildConfiguration2.java6
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchBarTracker.java7
3 files changed, 18 insertions, 9 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 9977f9d254..56798e3121 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 87dfea69ba..9471777548 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 14c211fefe..1be7430411 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();
}
}

Back to the top