Skip to content

Commit c366342

Browse files
Move showResultsForCompletedQuery to top level
1 parent b059775 commit c366342

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

extensions/ql-vscode/src/extension.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,11 @@ async function activateWithInstalledDistribution(
636636
const queryHistoryConfigurationListener = new QueryHistoryConfigListener();
637637
ctx.subscriptions.push(queryHistoryConfigurationListener);
638638
const showResults = async (item: CompletedLocalQueryInfo) =>
639-
showResultsForCompletedQuery(item, WebviewReveal.Forced);
639+
showResultsForCompletedQuery(
640+
localQueryResultsView,
641+
item,
642+
WebviewReveal.Forced,
643+
);
640644
const queryStorageDir = join(ctx.globalStorageUri.fsPath, "queries");
641645
await ensureDir(queryStorageDir);
642646
const labelProvider = new HistoryItemLabelProvider(
@@ -729,13 +733,6 @@ async function activateWithInstalledDistribution(
729733
void extLogger.log("Initializing source archive filesystem provider.");
730734
archiveFilesystemProvider_activate(ctx);
731735

732-
async function showResultsForCompletedQuery(
733-
query: CompletedLocalQueryInfo,
734-
forceReveal: WebviewReveal,
735-
): Promise<void> {
736-
await localQueryResultsView.showResults(query, forceReveal, false);
737-
}
738-
739736
async function compileAndRunQuery(
740737
quickEval: boolean,
741738
selectedQuery: Uri | undefined,
@@ -780,6 +777,7 @@ async function activateWithInstalledDistribution(
780777
);
781778
qhm.completeQuery(item, completedQueryInfo);
782779
await showResultsForCompletedQuery(
780+
localQueryResultsView,
783781
item as CompletedLocalQueryInfo,
784782
WebviewReveal.Forced,
785783
);
@@ -1730,6 +1728,14 @@ async function showResultsForComparison(
17301728
}
17311729
}
17321730

1731+
async function showResultsForCompletedQuery(
1732+
localQueryResultsView: ResultsView,
1733+
query: CompletedLocalQueryInfo,
1734+
forceReveal: WebviewReveal,
1735+
): Promise<void> {
1736+
await localQueryResultsView.showResults(query, forceReveal, false);
1737+
}
1738+
17331739
function addUnhandledRejectionListener() {
17341740
const handler = (error: unknown) => {
17351741
// This listener will be triggered for errors from other extensions as

0 commit comments

Comments
 (0)