mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
Merge pull request #201064 from jeanp413/fix-200430
Fix task progress indicator does not appear after the first time
This commit is contained in:
commit
5ce6349ae3
|
@ -960,6 +960,15 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
|
||||||
return Promise.reject(new Error(`Failed to create terminal for task ${task._label}`));
|
return Promise.reject(new Error(`Failed to create terminal for task ${task._label}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._fireTaskEvent(TaskEvent.start(task, terminal.instanceId, resolver.values));
|
||||||
|
const mapKey = task.getMapKey();
|
||||||
|
this._busyTasks[mapKey] = task;
|
||||||
|
this._fireTaskEvent(TaskEvent.general(TaskEventKind.Active, task, terminal.instanceId));
|
||||||
|
|
||||||
|
const problemMatchers = await this._resolveMatchers(resolver, task.configurationProperties.problemMatchers);
|
||||||
|
const startStopProblemMatcher = new StartStopProblemCollector(problemMatchers, this._markerService, this._modelService, ProblemHandlingStrategy.Clean, this._fileService);
|
||||||
|
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
|
||||||
|
|
||||||
let processStartedSignaled = false;
|
let processStartedSignaled = false;
|
||||||
terminal.processReady.then(() => {
|
terminal.processReady.then(() => {
|
||||||
if (!processStartedSignaled) {
|
if (!processStartedSignaled) {
|
||||||
|
@ -969,13 +978,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
|
||||||
}, (_error) => {
|
}, (_error) => {
|
||||||
// The process never got ready. Need to think how to handle this.
|
// The process never got ready. Need to think how to handle this.
|
||||||
});
|
});
|
||||||
this._fireTaskEvent(TaskEvent.start(task, terminal.instanceId, resolver.values));
|
|
||||||
const mapKey = task.getMapKey();
|
|
||||||
this._busyTasks[mapKey] = task;
|
|
||||||
this._fireTaskEvent(TaskEvent.general(TaskEventKind.Active, task, terminal.instanceId));
|
|
||||||
const problemMatchers = await this._resolveMatchers(resolver, task.configurationProperties.problemMatchers);
|
|
||||||
const startStopProblemMatcher = new StartStopProblemCollector(problemMatchers, this._markerService, this._modelService, ProblemHandlingStrategy.Clean, this._fileService);
|
|
||||||
this._terminalStatusManager.addTerminal(task, terminal, startStopProblemMatcher);
|
|
||||||
const onData = terminal.onLineData((line) => {
|
const onData = terminal.onLineData((line) => {
|
||||||
startStopProblemMatcher.processLine(line);
|
startStopProblemMatcher.processLine(line);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue