File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
extensions/ql-vscode/src/remote-queries Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212import {
1313 VariantAnalysis ,
1414 VariantAnalysisScannedRepositoryDownloadStatus ,
15+ VariantAnalysisScannedRepositoryResult ,
1516 VariantAnalysisScannedRepositoryState
1617} from './shared/variant-analysis' ;
1718import { getErrorMessage } from '../pure/helpers-pure' ;
@@ -37,6 +38,7 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
3738 this . variantAnalysisMonitor . onVariantAnalysisChange ( this . onVariantAnalysisUpdated . bind ( this ) ) ;
3839
3940 this . variantAnalysisResultsManager = this . push ( new VariantAnalysisResultsManager ( cliServer , storagePath , logger ) ) ;
41+ this . variantAnalysisResultsManager . onResultLoaded ( this . onRepoResultLoaded . bind ( this ) ) ;
4042 }
4143
4244 public async showView ( variantAnalysisId : number ) : Promise < void > {
@@ -85,6 +87,10 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
8587 await this . getView ( variantAnalysis . id ) ?. updateView ( variantAnalysis ) ;
8688 }
8789
90+ private async onRepoResultLoaded ( repositoryResult : VariantAnalysisScannedRepositoryResult ) : Promise < void > {
91+ await this . getView ( repositoryResult . variantAnalysisId ) ?. sendRepositoryResults ( [ repositoryResult ] ) ;
92+ }
93+
8894 private async onRepoStateUpdated ( variantAnalysisId : number , repoState : VariantAnalysisScannedRepositoryState ) : Promise < void > {
8995 await this . getView ( variantAnalysisId ) ?. updateRepoState ( repoState ) ;
9096 }
Original file line number Diff line number Diff line change 77 VariantAnalysis ,
88 VariantAnalysisQueryLanguage ,
99 VariantAnalysisRepoStatus ,
10+ VariantAnalysisScannedRepositoryResult ,
1011 VariantAnalysisScannedRepositoryState ,
1112 VariantAnalysisStatus
1213} from './shared/variant-analysis' ;
@@ -53,6 +54,17 @@ export class VariantAnalysisView extends AbstractWebview<ToVariantAnalysisMessag
5354 } ) ;
5455 }
5556
57+ public async sendRepositoryResults ( repositoryResult : VariantAnalysisScannedRepositoryResult [ ] ) : Promise < void > {
58+ if ( ! this . isShowingPanel ) {
59+ return ;
60+ }
61+
62+ await this . postMessage ( {
63+ t : 'setRepoResults' ,
64+ repoResults : repositoryResult ,
65+ } ) ;
66+ }
67+
5668 protected getPanelConfig ( ) : WebviewPanelConfig {
5769 return {
5870 viewId : VariantAnalysisView . viewType ,
You can’t perform that action at this time.
0 commit comments