16
16
17
17
import { ApplicationShell , FrontendApplication , WidgetManager , WidgetOpenMode } from '@theia/core/lib/browser' ;
18
18
import { open , OpenerService } from '@theia/core/lib/browser/opener-service' ;
19
- import { ILogger , CommandService } from '@theia/core/lib/common' ;
19
+ import { CommandService , ILogger } from '@theia/core/lib/common' ;
20
20
import { MessageService } from '@theia/core/lib/common/message-service' ;
21
21
import { Deferred } from '@theia/core/lib/common/promise-util' ;
22
22
import { QuickPickItem , QuickPickService } from '@theia/core/lib/common/quick-pick-service' ;
@@ -32,24 +32,24 @@ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service
32
32
import { inject , injectable , named , postConstruct } from 'inversify' ;
33
33
import { DiagnosticSeverity , Range } from 'vscode-languageserver-types' ;
34
34
import {
35
+ ApplyToKind ,
36
+ BackgroundTaskEndedEvent ,
37
+ DependsOrder ,
35
38
NamedProblemMatcher ,
36
39
ProblemMatchData ,
37
40
ProblemMatcher ,
41
+ RevealKind ,
38
42
RunTaskOption ,
39
43
TaskConfiguration ,
44
+ TaskConfigurationScope ,
40
45
TaskCustomization ,
41
- TaskExitedEvent ,
42
- TaskInfo ,
43
- TaskOutputProcessedEvent ,
44
- BackgroundTaskEndedEvent ,
45
46
TaskDefinition ,
46
- TaskServer ,
47
+ TaskExitedEvent ,
47
48
TaskIdentifier ,
48
- DependsOrder ,
49
- RevealKind ,
50
- ApplyToKind ,
49
+ TaskInfo ,
51
50
TaskOutputPresentation ,
52
- TaskConfigurationScope
51
+ TaskOutputProcessedEvent ,
52
+ TaskServer
53
53
} from '../common' ;
54
54
import { TaskWatcher } from '../common/task-watcher' ;
55
55
import { ProvidedTaskConfigurations } from './provided-task-configurations' ;
@@ -203,9 +203,6 @@ export class TaskService implements TaskConfigurationClient {
203
203
terminateSignal : new Deferred < string | undefined > ( ) ,
204
204
isBackgroundTaskEnded : new Deferred < boolean | undefined > ( )
205
205
} ) ;
206
- const taskConfig = event . config ;
207
- const taskIdentifier = taskConfig ? this . getTaskIdentifier ( taskConfig ) : event . taskId . toString ( ) ;
208
- this . messageService . info ( `Task '${ taskIdentifier } ' has been started.` ) ;
209
206
} ) ;
210
207
211
208
this . taskWatcher . onOutputProcessed ( async ( event : TaskOutputProcessedEvent ) => {
@@ -300,10 +297,7 @@ export class TaskService implements TaskConfigurationClient {
300
297
const taskConfig = event . config ;
301
298
const taskIdentifier = taskConfig ? this . getTaskIdentifier ( taskConfig ) : event . taskId . toString ( ) ;
302
299
if ( event . code !== undefined ) {
303
- const message = `Task '${ taskIdentifier } ' has exited with code ${ event . code } .` ;
304
- if ( event . code === 0 ) {
305
- this . messageService . info ( message ) ;
306
- } else {
300
+ if ( event . code !== 0 ) {
307
301
const eventTaskConfig = event . config ;
308
302
if ( eventTaskConfig && eventTaskConfig . presentation && eventTaskConfig . presentation . reveal === RevealKind . Silent && event . terminalId ) {
309
303
const terminal = this . terminalService . getByTerminalId ( event . terminalId ) ;
@@ -316,7 +310,7 @@ export class TaskService implements TaskConfigurationClient {
316
310
}
317
311
}
318
312
}
319
- this . messageService . error ( message ) ;
313
+ this . messageService . error ( `Task ' ${ taskIdentifier } ' has exited with code ${ event . code } .` ) ;
320
314
}
321
315
} else if ( event . signal !== undefined ) {
322
316
this . messageService . info ( `Task '${ taskIdentifier } ' was terminated by signal ${ event . signal } .` ) ;
0 commit comments