Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMat Booth2022-06-02 09:15:42 +0000
committerMat Booth2022-06-30 16:34:16 +0000
commit5e4a66b0afcc48c833569e72689b36b2adeb28ae (patch)
tree859fb440383a9b96cad98ebbc4fa6fcaf826541c /build
parent4a956060cd075ccaebc7aa02aaa0e267ee02d6f5 (diff)
downloadorg.eclipse.cdt-5e4a66b0afcc48c833569e72689b36b2adeb28ae.tar.gz
org.eclipse.cdt-5e4a66b0afcc48c833569e72689b36b2adeb28ae.tar.xz
org.eclipse.cdt-5e4a66b0afcc48c833569e72689b36b2adeb28ae.zip
Bug 580178 - Unable to stop build process from launchbar
Switch from the standard Java ProcessBuilder to the CDT CommandLauncher for new style core build projects. The CommandLauncher uses a more sophiscated mechanism for watching the spawned process allowing us to interrupt the process when the user hits the stop button on the launchbar by properly listening to a monitor. The change adds new API to CBuildCongifuration that takes a progress monitor, and changes all the affected build configuration types to use this new API. Change-Id: I0c4225616ad8331c2cea28bcb502028455a8ea71
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.core.autotools.core/src/org/eclipse/cdt/core/autotools/core/AutotoolsBuildConfiguration.java4
-rw-r--r--build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.core.autotools.core/src/org/eclipse/cdt/core/autotools/core/AutotoolsBuildConfiguration.java b/build/org.eclipse.cdt.core.autotools.core/src/org/eclipse/cdt/core/autotools/core/AutotoolsBuildConfiguration.java
index f6497540771..4dc47efb12f 100644
--- a/build/org.eclipse.cdt.core.autotools.core/src/org/eclipse/cdt/core/autotools/core/AutotoolsBuildConfiguration.java
+++ b/build/org.eclipse.cdt.core.autotools.core/src/org/eclipse/cdt/core/autotools/core/AutotoolsBuildConfiguration.java
@@ -106,7 +106,7 @@ public class AutotoolsBuildConfiguration extends CBuildConfiguration {
try {
// TODO Error parsers
Process process = builder.start();
- watchProcess(process, console);
+ watchProcess(console, monitor);
} catch (IOException e) {
throw new CoreException(Activator.errorStatus("Error executing: " + String.join(" ", command), e)); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -153,7 +153,7 @@ public class AutotoolsBuildConfiguration extends CBuildConfiguration {
Activator.errorStatus("Error executing: " + String.join(" ", command), null)); //$NON-NLS-1$ //$NON-NLS-2$
}
- watchProcess(p, new IConsoleParser[] { epm });
+ watchProcess(new IConsoleParser[] { epm }, monitor);
}
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
diff --git a/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java b/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
index dc33eb56228..0be025a4838 100644
--- a/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
+++ b/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015, 2018 QNX Software Systems and others.
+ * Copyright (c) 2015, 2022 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -183,7 +183,7 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
return null;
}
- watchProcess(p, console);
+ watchProcess(console, monitor);
}
if (!Files.exists(buildDir.resolve("build.ninja"))) { //$NON-NLS-1$
@@ -238,7 +238,7 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
return null;
}
- watchProcess(p, new IConsoleParser[] { epm });
+ watchProcess(new IConsoleParser[] { epm }, monitor);
}
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
@@ -298,7 +298,7 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
return;
}
- watchProcess(p, console);
+ watchProcess(console, monitor);
}
outStream.write(String.format(Messages.MesonBuildConfiguration_BuildingComplete, buildDir.toString()));

Back to the top