@@ -200,8 +200,8 @@ export class LanguageStatusUI {
200
200
if ( this . isParsingWorkspacePaused ) {
201
201
const displayTwoStatus : boolean = this . isParsingFiles && this . isParsingWorkspace ;
202
202
return ( this . isParsingFiles ? this . parsingFilesTooltip : "" )
203
- + ( displayTwoStatus ? " | " : "" )
204
- + ( this . isParsingWorkspace ? this . workspaceParsingPausedText : "" ) ;
203
+ + ( displayTwoStatus ? " | " : "" )
204
+ + ( this . isParsingWorkspace ? this . workspaceParsingPausedText : "" ) ;
205
205
} else {
206
206
return this . isParsingWorkspace ? this . workspaceParsingRunningText : this . parsingFilesTooltip ;
207
207
}
@@ -260,6 +260,13 @@ export class LanguageStatusUI {
260
260
} ;
261
261
return item ;
262
262
}
263
+
264
+ public refreshCodeAnalysisText ( isRunningCodeAnalysis : boolean ) {
265
+ const activeText : string = this . isCodeAnalysisPaused ? this . codeAnalysisPausedText : this . codeAnalysisRunningText ;
266
+ const idleText : string = this . codeAnalysisModePrefix + this . codeAnalysisCurrentMode ( ) ;
267
+ this . codeAnalysisStatusItem . text = isRunningCodeAnalysis ? activeText : idleText ;
268
+ }
269
+
263
270
private setIsCodeAnalysisPaused ( val : boolean ) : void {
264
271
if ( ! this . isRunningCodeAnalysis ) {
265
272
return ;
@@ -286,9 +293,7 @@ export class LanguageStatusUI {
286
293
}
287
294
this . isRunningCodeAnalysis = val ;
288
295
this . codeAnalysisStatusItem . busy = val ;
289
- const activeText : string = this . isCodeAnalysisPaused ? this . codeAnalysisPausedText : this . codeAnalysisRunningText ;
290
- const idleText : string = this . codeAnalysisModePrefix + this . codeAnalysisCurrentMode ( ) ;
291
- this . codeAnalysisStatusItem . text = val ? activeText : idleText ;
296
+ this . refreshCodeAnalysisText ( val ) ;
292
297
this . codeAnalysisStatusItem . command = val ? {
293
298
command : "C_Cpp.ShowActiveCodeAnalysisCommands" ,
294
299
title : localize ( "c.cpp.codeanalysis.statusbar.showCodeAnalysisOptions" , "Options" ) ,
@@ -497,7 +502,7 @@ export class LanguageStatusUI {
497
502
// TODO: Check some "AlwaysShow" setting here.
498
503
this . ShowConfiguration = isCppOrRelated || ( util . getWorkspaceIsCpp ( ) &&
499
504
( activeEditor . document . fileName . endsWith ( "tasks.json" ) ||
500
- activeEditor . document . fileName . endsWith ( "launch.json" ) ) ) ;
505
+ activeEditor . document . fileName . endsWith ( "launch.json" ) ) ) ;
501
506
502
507
if ( this . showConfigureIntelliSenseButton ) {
503
508
if ( isCppOrRelated && ! ! this . currentClient && this . currentClient . getShowConfigureIntelliSenseButton ( ) ) {
0 commit comments