diff options
author | Doug Schaefer | 2017-11-03 20:48:20 +0000 |
---|---|---|
committer | Doug Schaefer | 2017-11-03 20:48:20 +0000 |
commit | 87cd8401f4e36dfc25912e6c768dde2ae9caed4a (patch) | |
tree | 6aa870bd1899bc7e3bc6279c958389dc938f09af /build/org.eclipse.cdt.cmake.core | |
parent | ceeac1865a9b25e7bb97142abb3ac2d4b8213dc5 (diff) | |
download | org.eclipse.cdt-87cd8401f4e36dfc25912e6c768dde2ae9caed4a.tar.gz org.eclipse.cdt-87cd8401f4e36dfc25912e6c768dde2ae9caed4a.tar.xz org.eclipse.cdt-87cd8401f4e36dfc25912e6c768dde2ae9caed4a.zip |
Hook up the error parser properly in the build configuration.
So we can have the error partitions that work with double clicking
in the build console.
Change-Id: I357f4efb8fd16232b78b18958c9863071feeebcc
Diffstat (limited to 'build/org.eclipse.cdt.cmake.core')
-rw-r--r-- | build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java index 14d9fae4f0b..31be86178bc 100644 --- a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java +++ b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java @@ -94,6 +94,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration { public IProject[] build(int kind, Map<String, String> args, IConsole console, IProgressMonitor monitor) throws CoreException { IProject project = getProject(); + try { String generator = getProperty(CMAKE_GENERATOR); if (generator == null) { @@ -146,11 +147,13 @@ public class CMakeBuildConfiguration extends CBuildConfiguration { setBuildEnvironment(processBuilder.environment()); Process process = processBuilder.start(); outStream.write(String.join(" ", command) + '\n'); //$NON-NLS-1$ - watchProcess(process, new IConsoleParser[0], console); + watchProcess(process, console); } try (ErrorParserManager epm = new ErrorParserManager(project, getBuildDirectoryURI(), this, getToolChain().getErrorParserIds())) { + epm.setOutputStream(console.getOutputStream()); + String buildCommand = getProperty(BUILD_COMMAND); if (buildCommand == null) { if (generator.equals("Ninja")) { //$NON-NLS-1$ @@ -170,7 +173,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration { setBuildEnvironment(processBuilder.environment()); Process process = processBuilder.start(); outStream.write(String.join(" ", command) + '\n'); //$NON-NLS-1$ - watchProcess(process, new IConsoleParser[] { epm }, console); + watchProcess(process, new IConsoleParser[] { epm }); } project.refreshLocal(IResource.DEPTH_INFINITE, monitor); @@ -219,7 +222,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration { ProcessBuilder processBuilder = new ProcessBuilder(command).directory(buildDir.toFile()); Process process = processBuilder.start(); outStream.write(String.join(" ", command) + '\n'); //$NON-NLS-1$ - watchProcess(process, new IConsoleParser[0], console); + watchProcess(process, console); project.refreshLocal(IResource.DEPTH_INFINITE, monitor); } catch (IOException e) { |