mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-07 17:15:25 +02:00
Bug 412919: Progress monitor shows previous build command rather than the one which is running
This commit is contained in:
parent
d0cafe4cfb
commit
fc77bb25a2
1 changed files with 15 additions and 2 deletions
|
@ -234,7 +234,7 @@ public class BuildRunnerHelper implements Closeable {
|
|||
IPath workingDirectory = new Path(pathFromURI);
|
||||
|
||||
String errMsg = null;
|
||||
monitor.subTask(CCorePlugin.getFormattedString("BuildRunnerHelper.invokingCommand", launcher.getCommandLine())); //$NON-NLS-1$
|
||||
monitor.subTask(CCorePlugin.getFormattedString("BuildRunnerHelper.invokingCommand", guessCommandLine(buildCommand.toString(), args))); //$NON-NLS-1$
|
||||
Process p = launcher.execute(buildCommand, args, envp, workingDirectory, monitor);
|
||||
monitor.worked(TICKS_EXECUTE_PROGRAM);
|
||||
if (p != null) {
|
||||
|
@ -453,6 +453,19 @@ public class BuildRunnerHelper implements Closeable {
|
|||
errorParserManager.processLine(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose command line that presumably will be run by launcher.
|
||||
*/
|
||||
private static String guessCommandLine(String command, String[] args) {
|
||||
StringBuffer buf = new StringBuffer(command + ' ');
|
||||
if (args != null) {
|
||||
for (String arg : args) {
|
||||
buf.append(arg);
|
||||
buf.append(' ');
|
||||
}
|
||||
}
|
||||
return buf.toString().trim();
|
||||
}
|
||||
/**
|
||||
* Print a message to the console info output. Note that this message is colored
|
||||
* with the color assigned to "Info" stream.
|
||||
|
|
Loading…
Add table
Reference in a new issue