@@ -21,7 +21,7 @@ import { ActiveSolutionTracker } from './active-solution-tracker';
2121import { CSolution } from './csolution' ;
2222import { UPDATE_DEBUG_TASKS_COMMAND_ID } from '../debug/debug-launch-provider' ;
2323import { Severity } from './constants' ;
24- import { SolutionEventHub , ConvertResultData } from './solution-event-hub' ;
24+ import { SolutionEventHub , ConvertResultData , CbuildResultData } from './solution-event-hub' ;
2525import { ExtensionApiProvider } from '../vscode-api/extension-api-provider' ;
2626import { EnvironmentManagerApiV1 } from '@arm-software/vscode-environment-manager' ;
2727import { ETextFileResult } from '../generic/text-file' ;
@@ -103,6 +103,7 @@ export class SolutionManagerImpl implements SolutionManager {
103103 this . activeSolutionTracker . onDidChangeActiveSolution ( this . handleChangeActiveSolution , this ) ,
104104 this . activeSolutionTracker . onActiveSolutionFilesChanged ( this . handleActiveSolutionFilesChanged , this ) ,
105105 this . eventHub . onDidConvertCompleted ( this . handleSolutionConvertCompleted , this ) ,
106+ this . eventHub . onDidCbuildCompleted ( this . handleCbuildCompleted , this ) ,
106107 this . commandsProvider . registerCommand ( SolutionManagerImpl . refreshCommandId , this . refresh , this ) ,
107108 this . environmentManagerApiProvider . onActivate ( environmentManagerApi => {
108109 environmentManagerApi . onDidActivate ( ( ) => {
@@ -250,7 +251,13 @@ export class SolutionManagerImpl implements SolutionManager {
250251 await this . commandsProvider . executeCommandIfRegistered ( UPDATE_DEBUG_TASKS_COMMAND_ID ) ;
251252 }
252253 this . loadBuildFilesEmitter . fire ( [ data . severity , data . detection ] ) ;
253- this . updatedCompileCommandsEmitter . fire ( ) ;
254+ }
255+
256+ private handleCbuildCompleted ( _data : CbuildResultData ) : void {
257+ if ( this . csolution ) {
258+ // Cbuild setup completed: signal compile-commands update for ClangdManager
259+ this . updatedCompileCommandsEmitter . fire ( ) ;
260+ }
254261 }
255262
256263 public async loadSolutionBuildFiles ( ) {
0 commit comments