Skip to content

Commit

Permalink
log analysis manager findings events
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtrotta committed Aug 23, 2023
1 parent f640785 commit 6404cc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/analysisManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ export default class AnalysisManager {

this.findingsDiagnosticsProvider = new FindingsDiagnosticsProvider();
this._findingsIndex.on('added', (uri: vscode.Uri, findings: ResolvedFinding[]) => {
console.log(`[analysis-manager] Added ${findings.length} findings to ${uri}`);
this.findingsDiagnosticsProvider?.updateFindings(uri, findings);
vscode.commands.executeCommand('setContext', 'appmap.numFindings', findings.length);
});
this._findingsIndex.on('removed', (uri: vscode.Uri) => {
console.log(`[analysis-manager] Removed findings form ${uri}`);
this.findingsDiagnosticsProvider?.updateFindings(uri, []);
const findings = this._findingsIndex?.findings();
const numFindings = findings?.length || 0;
Expand Down

0 comments on commit 6404cc4

Please sign in to comment.