@@ -953,6 +953,8 @@ export class DefaultClient implements Client {
953953 public getShowConfigureIntelliSenseButton ( ) : boolean { return this . showConfigureIntelliSenseButton ; }
954954 public setShowConfigureIntelliSenseButton ( show : boolean ) : void { this . showConfigureIntelliSenseButton = show ; }
955955
956+ private lastInvokedLspMessage : string = "" ;
957+
956958 /**
957959 * don't use this.rootFolder directly since it can be undefined
958960 */
@@ -1704,16 +1706,21 @@ export class DefaultClient implements Client {
17041706
17051707 // Wait 1 seconds to allow time for the file watcher to signal a crash call stack write has occurred.
17061708 setTimeout ( ( ) => {
1707- telemetry . logLanguageServerEvent ( "languageClientCrash" , undefined , {
1708- restarting : Number ( restart ) ,
1709- writingCrashCallStack : Number ( isWritingCrashCallStack ) ,
1710- initializingWorkspace : Number ( this . model . isInitializingWorkspace . Value ) ,
1711- indexingWorkspace : Number ( this . model . isIndexingWorkspace . Value ) ,
1712- parsingWorkspace : Number ( this . model . isParsingWorkspace . Value ) ,
1713- parsingFiles : Number ( this . model . isParsingFiles . Value ) ,
1714- updatingIntelliSense : Number ( this . model . isUpdatingIntelliSense . Value ) ,
1715- runningCodeAnalysis : Number ( this . model . isRunningCodeAnalysis . Value )
1716- } ) ;
1709+ telemetry . logLanguageServerEvent ( "languageClientCrash" ,
1710+ {
1711+ lastInvokedLspMessage : this . lastInvokedLspMessage
1712+ } ,
1713+ {
1714+ restarting : Number ( restart ) ,
1715+ writingCrashCallStack : Number ( isWritingCrashCallStack ) ,
1716+ initializingWorkspace : Number ( this . model . isInitializingWorkspace . Value ) ,
1717+ indexingWorkspace : Number ( this . model . isIndexingWorkspace . Value ) ,
1718+ parsingWorkspace : Number ( this . model . isParsingWorkspace . Value ) ,
1719+ parsingFiles : Number ( this . model . isParsingFiles . Value ) ,
1720+ updatingIntelliSense : Number ( this . model . isUpdatingIntelliSense . Value ) ,
1721+ runningCodeAnalysis : Number ( this . model . isRunningCodeAnalysis . Value )
1722+ }
1723+ ) ;
17171724 } , 1000 ) ;
17181725
17191726 const message : string = restart ? localize ( 'server.crashed.restart' , 'The language server crashed. Restarting...' )
@@ -2782,55 +2789,59 @@ export class DefaultClient implements Client {
27822789 const message : string = notificationBody . status ;
27832790 util . setProgress ( util . getProgressExecutableSuccess ( ) ) ;
27842791 const testHook : TestHook = getTestHook ( ) ;
2785- if ( message . endsWith ( "Idle" ) ) {
2786- const status : IntelliSenseStatus = { status : Status . Idle } ;
2787- testHook . updateStatus ( status ) ;
2788- } else if ( message . endsWith ( "Parsing" ) ) {
2789- this . model . isParsingWorkspace . Value = true ;
2790- this . model . isInitializingWorkspace . Value = false ;
2791- this . model . isIndexingWorkspace . Value = false ;
2792- const status : IntelliSenseStatus = { status : Status . TagParsingBegun } ;
2793- testHook . updateStatus ( status ) ;
2794- } else if ( message . endsWith ( "Initializing" ) ) {
2795- this . model . isInitializingWorkspace . Value = true ;
2796- this . model . isIndexingWorkspace . Value = false ;
2797- this . model . isParsingWorkspace . Value = false ;
2798- } else if ( message . endsWith ( "Indexing" ) ) {
2799- this . model . isIndexingWorkspace . Value = true ;
2800- this . model . isInitializingWorkspace . Value = false ;
2801- this . model . isParsingWorkspace . Value = false ;
2802- } else if ( message . endsWith ( "files" ) ) {
2803- this . model . isParsingFiles . Value = true ;
2804- } else if ( message . endsWith ( "IntelliSense" ) ) {
2805- timeStamp = Date . now ( ) ;
2806- this . model . isUpdatingIntelliSense . Value = true ;
2807- const status : IntelliSenseStatus = { status : Status . IntelliSenseCompiling } ;
2808- testHook . updateStatus ( status ) ;
2809- } else if ( message . endsWith ( "IntelliSense done" ) ) {
2810- getOutputChannelLogger ( ) . appendLineAtLevel ( 6 , localize ( "update.intellisense.time" , "Update IntelliSense time (sec): {0}" , ( Date . now ( ) - timeStamp ) / 1000 ) ) ;
2811- this . model . isUpdatingIntelliSense . Value = false ;
2812- const status : IntelliSenseStatus = { status : Status . IntelliSenseReady } ;
2813- testHook . updateStatus ( status ) ;
2814- } else if ( message . endsWith ( "Parsing done" ) ) { // Tag Parser Ready
2815- this . model . isParsingWorkspace . Value = false ;
2816- const status : IntelliSenseStatus = { status : Status . TagParsingDone } ;
2817- testHook . updateStatus ( status ) ;
2818- util . setProgress ( util . getProgressParseRootSuccess ( ) ) ;
2819- } else if ( message . endsWith ( "files done" ) ) {
2820- this . model . isParsingFiles . Value = false ;
2821- } else if ( message . endsWith ( "Analysis" ) ) {
2822- this . model . isRunningCodeAnalysis . Value = true ;
2823- this . model . codeAnalysisTotal . Value = 1 ;
2824- this . model . codeAnalysisProcessed . Value = 0 ;
2825- } else if ( message . endsWith ( "Analysis done" ) ) {
2826- this . model . isRunningCodeAnalysis . Value = false ;
2827- } else if ( message . includes ( "Squiggles Finished - File name:" ) ) {
2828- const index : number = message . lastIndexOf ( ":" ) ;
2829- const name : string = message . substring ( index + 2 ) ;
2830- const status : IntelliSenseStatus = { status : Status . IntelliSenseReady , filename : name } ;
2831- testHook . updateStatus ( status ) ;
2832- } else if ( message . endsWith ( "No Squiggles" ) ) {
2833- util . setIntelliSenseProgress ( util . getProgressIntelliSenseNoSquiggles ( ) ) ;
2792+ if ( message . startsWith ( "C_Cpp: " ) ) {
2793+ if ( message . endsWith ( "Idle" ) ) {
2794+ const status : IntelliSenseStatus = { status : Status . Idle } ;
2795+ testHook . updateStatus ( status ) ;
2796+ } else if ( message . endsWith ( "Parsing" ) ) {
2797+ this . model . isParsingWorkspace . Value = true ;
2798+ this . model . isInitializingWorkspace . Value = false ;
2799+ this . model . isIndexingWorkspace . Value = false ;
2800+ const status : IntelliSenseStatus = { status : Status . TagParsingBegun } ;
2801+ testHook . updateStatus ( status ) ;
2802+ } else if ( message . endsWith ( "Initializing" ) ) {
2803+ this . model . isInitializingWorkspace . Value = true ;
2804+ this . model . isIndexingWorkspace . Value = false ;
2805+ this . model . isParsingWorkspace . Value = false ;
2806+ } else if ( message . endsWith ( "Indexing" ) ) {
2807+ this . model . isIndexingWorkspace . Value = true ;
2808+ this . model . isInitializingWorkspace . Value = false ;
2809+ this . model . isParsingWorkspace . Value = false ;
2810+ } else if ( message . endsWith ( "files" ) ) {
2811+ this . model . isParsingFiles . Value = true ;
2812+ } else if ( message . endsWith ( "IntelliSense" ) ) {
2813+ timeStamp = Date . now ( ) ;
2814+ this . model . isUpdatingIntelliSense . Value = true ;
2815+ const status : IntelliSenseStatus = { status : Status . IntelliSenseCompiling } ;
2816+ testHook . updateStatus ( status ) ;
2817+ } else if ( message . endsWith ( "IntelliSense done" ) ) {
2818+ getOutputChannelLogger ( ) . appendLineAtLevel ( 6 , localize ( "update.intellisense.time" , "Update IntelliSense time (sec): {0}" , ( Date . now ( ) - timeStamp ) / 1000 ) ) ;
2819+ this . model . isUpdatingIntelliSense . Value = false ;
2820+ const status : IntelliSenseStatus = { status : Status . IntelliSenseReady } ;
2821+ testHook . updateStatus ( status ) ;
2822+ } else if ( message . endsWith ( "Parsing done" ) ) { // Tag Parser Ready
2823+ this . model . isParsingWorkspace . Value = false ;
2824+ const status : IntelliSenseStatus = { status : Status . TagParsingDone } ;
2825+ testHook . updateStatus ( status ) ;
2826+ util . setProgress ( util . getProgressParseRootSuccess ( ) ) ;
2827+ } else if ( message . endsWith ( "files done" ) ) {
2828+ this . model . isParsingFiles . Value = false ;
2829+ } else if ( message . endsWith ( "Analysis" ) ) {
2830+ this . model . isRunningCodeAnalysis . Value = true ;
2831+ this . model . codeAnalysisTotal . Value = 1 ;
2832+ this . model . codeAnalysisProcessed . Value = 0 ;
2833+ } else if ( message . endsWith ( "Analysis done" ) ) {
2834+ this . model . isRunningCodeAnalysis . Value = false ;
2835+ } else if ( message . includes ( "Squiggles Finished - File name:" ) ) {
2836+ const index : number = message . lastIndexOf ( ":" ) ;
2837+ const name : string = message . substring ( index + 2 ) ;
2838+ const status : IntelliSenseStatus = { status : Status . IntelliSenseReady , filename : name } ;
2839+ testHook . updateStatus ( status ) ;
2840+ } else if ( message . endsWith ( "No Squiggles" ) ) {
2841+ util . setIntelliSenseProgress ( util . getProgressIntelliSenseNoSquiggles ( ) ) ;
2842+ }
2843+ } else if ( message . includes ( "/" ) ) {
2844+ this . lastInvokedLspMessage = message ;
28342845 }
28352846 }
28362847
0 commit comments