@@ -532,6 +532,12 @@ interface InitializationOptions {
532
532
settings : SettingsParams ;
533
533
} ;
534
534
535
+ interface TagParseStatus {
536
+ localizeStringParams : LocalizeStringParams ;
537
+ isPausable : boolean ;
538
+ isPaused : boolean ;
539
+ }
540
+
535
541
// Requests
536
542
const QueryCompilerDefaultsRequest : RequestType < QueryDefaultCompilerParams , configs . CompilerDefaults , void > = new RequestType < QueryDefaultCompilerParams , configs . CompilerDefaults , void > ( 'cpptools/queryCompilerDefaults' ) ;
537
543
const QueryTranslationUnitSourceRequest : RequestType < QueryTranslationUnitSourceParams , QueryTranslationUnitSourceResult , void > = new RequestType < QueryTranslationUnitSourceParams , QueryTranslationUnitSourceResult , void > ( 'cpptools/queryTranslationUnitSource' ) ;
@@ -586,7 +592,7 @@ const RemoveCodeAnalysisProblemsNotification: NotificationType<RemoveCodeAnalysi
586
592
const ReloadWindowNotification : NotificationType < void > = new NotificationType < void > ( 'cpptools/reloadWindow' ) ;
587
593
const UpdateTrustedCompilersNotification : NotificationType < UpdateTrustedCompilerPathsResult > = new NotificationType < UpdateTrustedCompilerPathsResult > ( 'cpptools/updateTrustedCompilersList' ) ;
588
594
const LogTelemetryNotification : NotificationType < TelemetryPayload > = new NotificationType < TelemetryPayload > ( 'cpptools/logTelemetry' ) ;
589
- const ReportTagParseStatusNotification : NotificationType < LocalizeStringParams > = new NotificationType < LocalizeStringParams > ( 'cpptools/reportTagParseStatus' ) ;
595
+ const ReportTagParseStatusNotification : NotificationType < TagParseStatus > = new NotificationType < TagParseStatus > ( 'cpptools/reportTagParseStatus' ) ;
590
596
const ReportStatusNotification : NotificationType < ReportStatusNotificationBody > = new NotificationType < ReportStatusNotificationBody > ( 'cpptools/reportStatus' ) ;
591
597
const DebugProtocolNotification : NotificationType < DebugProtocolParams > = new NotificationType < DebugProtocolParams > ( 'cpptools/debugProtocol' ) ;
592
598
const DebugLogNotification : NotificationType < LocalizeStringParams > = new NotificationType < LocalizeStringParams > ( 'cpptools/debugLog' ) ;
@@ -2317,18 +2323,10 @@ export class DefaultClient implements Client {
2317
2323
}
2318
2324
}
2319
2325
2320
- private updateTagParseStatus ( notificationBody : LocalizeStringParams ) : void {
2321
- this . model . parsingWorkspaceStatus . Value = getLocalizedString ( notificationBody ) ;
2322
- if ( notificationBody . text . startsWith ( "Workspace parsing paused" ) ) {
2323
- this . model . isParsingWorkspacePaused . Value = true ;
2324
- this . model . isParsingWorkspacePausable . Value = true ;
2325
- } else if ( notificationBody . text . startsWith ( "Parsing workspace" ) ) {
2326
- this . model . isParsingWorkspacePaused . Value = false ;
2327
- this . model . isParsingWorkspacePausable . Value = true ;
2328
- } else {
2329
- this . model . isParsingWorkspacePaused . Value = false ;
2330
- this . model . isParsingWorkspacePausable . Value = false ;
2331
- }
2326
+ private updateTagParseStatus ( tagParseStatus : TagParseStatus ) : void {
2327
+ this . model . parsingWorkspaceStatus . Value = getLocalizedString ( tagParseStatus . localizeStringParams ) ;
2328
+ this . model . isParsingWorkspacePausable . Value = tagParseStatus . isPausable ;
2329
+ this . model . isParsingWorkspacePaused . Value = tagParseStatus . isPaused ;
2332
2330
}
2333
2331
2334
2332
private updateInactiveRegions ( params : InactiveRegionParams ) : void {
0 commit comments