Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-05-15 17:16:43 -0400
committerJeff Johnston2019-05-15 17:16:43 -0400
commita62215e851fc83e536dbd402ac35702462a7c0ff (patch)
tree37b0591372ad2b56ccc144e835e921947654fb33
parent19e4eabff27e9a699e51edddc43b5f2e6d76d26e (diff)
downloadorg.eclipse.cdt-a62215e851fc83e536dbd402ac35702462a7c0ff.tar.gz
org.eclipse.cdt-a62215e851fc83e536dbd402ac35702462a7c0ff.tar.xz
org.eclipse.cdt-a62215e851fc83e536dbd402ac35702462a7c0ff.zip
Bug 547145 - Core build use of ProjectDescription should be synchronized
- also change ContainerLaunchConfigurationDelegate Change-Id: I5574d67ae030e728605c12f7bc05bcbb8e23e83d
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
index a011e60ce1..42e3fce2c6 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
@@ -30,6 +30,7 @@ import org.eclipse.cdt.core.build.ICBuildConfiguration;
import org.eclipse.cdt.core.build.ICBuildConfigurationManager;
import org.eclipse.cdt.core.build.IToolChain;
import org.eclipse.cdt.core.build.IToolChainManager;
+import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
@@ -582,9 +583,12 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate impl
if (target != null) {
ICBuildConfiguration cconfig = getBuildConfiguration(configuration, mode, target, monitor);
if (cconfig != null) {
- IProjectDescription desc = project.getDescription();
- desc.setActiveBuildConfig(cconfig.getBuildConfiguration().getName());
- project.setDescription(desc, monitor);
+ CoreModel model = CoreModel.getDefault();
+ synchronized (model) {
+ IProjectDescription desc = project.getDescription();
+ desc.setActiveBuildConfig(cconfig.getBuildConfiguration().getName());
+ project.setDescription(desc, monitor);
+ }
}
}
}

Back to the top