@@ -960,6 +960,15 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
960
960
return Promise . reject ( new Error ( `Failed to create terminal for task ${ task . _label } ` ) ) ;
961
961
}
962
962
963
+ this . _fireTaskEvent ( TaskEvent . start ( task , terminal . instanceId , resolver . values ) ) ;
964
+ const mapKey = task . getMapKey ( ) ;
965
+ this . _busyTasks [ mapKey ] = task ;
966
+ this . _fireTaskEvent ( TaskEvent . general ( TaskEventKind . Active , task , terminal . instanceId ) ) ;
967
+
968
+ const problemMatchers = await this . _resolveMatchers ( resolver , task . configurationProperties . problemMatchers ) ;
969
+ const startStopProblemMatcher = new StartStopProblemCollector ( problemMatchers , this . _markerService , this . _modelService , ProblemHandlingStrategy . Clean , this . _fileService ) ;
970
+ this . _terminalStatusManager . addTerminal ( task , terminal , startStopProblemMatcher ) ;
971
+
963
972
let processStartedSignaled = false ;
964
973
terminal . processReady . then ( ( ) => {
965
974
if ( ! processStartedSignaled ) {
@@ -969,13 +978,7 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
969
978
} , ( _error ) => {
970
979
// The process never got ready. Need to think how to handle this.
971
980
} ) ;
972
- this . _fireTaskEvent ( TaskEvent . start ( task , terminal . instanceId , resolver . values ) ) ;
973
- const mapKey = task . getMapKey ( ) ;
974
- this . _busyTasks [ mapKey ] = task ;
975
- this . _fireTaskEvent ( TaskEvent . general ( TaskEventKind . Active , task , terminal . instanceId ) ) ;
976
- const problemMatchers = await this . _resolveMatchers ( resolver , task . configurationProperties . problemMatchers ) ;
977
- const startStopProblemMatcher = new StartStopProblemCollector ( problemMatchers , this . _markerService , this . _modelService , ProblemHandlingStrategy . Clean , this . _fileService ) ;
978
- this . _terminalStatusManager . addTerminal ( task , terminal , startStopProblemMatcher ) ;
981
+
979
982
const onData = terminal . onLineData ( ( line ) => {
980
983
startStopProblemMatcher . processLine ( line ) ;
981
984
} ) ;
0 commit comments