@@ -532,6 +532,12 @@ interface InitializationOptions {
532532 settings : SettingsParams ;
533533} ;
534534
535+ interface TagParseStatus {
536+ localizeStringParams : LocalizeStringParams ;
537+ isPausable : boolean ;
538+ isPaused : boolean ;
539+ }
540+
535541// Requests
536542const QueryCompilerDefaultsRequest : RequestType < QueryDefaultCompilerParams , configs . CompilerDefaults , void > = new RequestType < QueryDefaultCompilerParams , configs . CompilerDefaults , void > ( 'cpptools/queryCompilerDefaults' ) ;
537543const QueryTranslationUnitSourceRequest : RequestType < QueryTranslationUnitSourceParams , QueryTranslationUnitSourceResult , void > = new RequestType < QueryTranslationUnitSourceParams , QueryTranslationUnitSourceResult , void > ( 'cpptools/queryTranslationUnitSource' ) ;
@@ -586,7 +592,7 @@ const RemoveCodeAnalysisProblemsNotification: NotificationType<RemoveCodeAnalysi
586592const ReloadWindowNotification : NotificationType < void > = new NotificationType < void > ( 'cpptools/reloadWindow' ) ;
587593const UpdateTrustedCompilersNotification : NotificationType < UpdateTrustedCompilerPathsResult > = new NotificationType < UpdateTrustedCompilerPathsResult > ( 'cpptools/updateTrustedCompilersList' ) ;
588594const 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' ) ;
590596const ReportStatusNotification : NotificationType < ReportStatusNotificationBody > = new NotificationType < ReportStatusNotificationBody > ( 'cpptools/reportStatus' ) ;
591597const DebugProtocolNotification : NotificationType < DebugProtocolParams > = new NotificationType < DebugProtocolParams > ( 'cpptools/debugProtocol' ) ;
592598const DebugLogNotification : NotificationType < LocalizeStringParams > = new NotificationType < LocalizeStringParams > ( 'cpptools/debugLog' ) ;
@@ -2317,18 +2323,10 @@ export class DefaultClient implements Client {
23172323 }
23182324 }
23192325
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 ;
23322330 }
23332331
23342332 private updateInactiveRegions ( params : InactiveRegionParams ) : void {
0 commit comments