Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions extensions/ql-vscode/src/compare/compare-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import { DatabaseManager } from '../databases';
import { getHtmlForWebview, jumpToLocation } from '../interface-utils';
import { transformBqrsResultSet, RawResultSet, BQRSInfo } from '../pure/bqrs-cli-types';
import resultsDiff from './resultsDiff';
import { FullCompletedQueryInfo } from '../query-results';
import { CompletedLocalQueryInfo } from '../query-results';

interface ComparePair {
from: FullCompletedQueryInfo;
to: FullCompletedQueryInfo;
from: CompletedLocalQueryInfo;
to: CompletedLocalQueryInfo;
}

export class CompareInterfaceManager extends DisposableObject {
Expand All @@ -39,15 +39,15 @@ export class CompareInterfaceManager extends DisposableObject {
private cliServer: CodeQLCliServer,
private logger: Logger,
private showQueryResultsCallback: (
item: FullCompletedQueryInfo
item: CompletedLocalQueryInfo
) => Promise<void>
) {
super();
}

async showResults(
from: FullCompletedQueryInfo,
to: FullCompletedQueryInfo,
from: CompletedLocalQueryInfo,
to: CompletedLocalQueryInfo,
selectedResultSetName?: string
) {
this.comparePair = { from, to };
Expand Down Expand Up @@ -188,8 +188,8 @@ export class CompareInterfaceManager extends DisposableObject {
}

private async findCommonResultSetNames(
from: FullCompletedQueryInfo,
to: FullCompletedQueryInfo,
from: CompletedLocalQueryInfo,
to: CompletedLocalQueryInfo,
selectedResultSetName: string | undefined
): Promise<[string[], string, RawResultSet, RawResultSet]> {
const fromSchemas = await this.cliServer.bqrsInfo(
Expand Down
16 changes: 8 additions & 8 deletions extensions/ql-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import { InterfaceManager } from './interface';
import { WebviewReveal } from './interface-utils';
import { ideServerLogger, logger, queryServerLogger } from './logging';
import { QueryHistoryManager } from './query-history';
import { FullCompletedQueryInfo, FullQueryInfo } from './query-results';
import { CompletedLocalQueryInfo, LocalQueryInfo } from './query-results';
import * as qsClient from './queryserver-client';
import { displayQuickQuery } from './quick-query';
import { compileAndRunQueryAgainstDatabase, createInitialQueryInfo } from './run-queries';
Expand Down Expand Up @@ -442,7 +442,7 @@ async function activateWithInstalledDistribution(
void logger.log('Initializing query history manager.');
const queryHistoryConfigurationListener = new QueryHistoryConfigListener();
ctx.subscriptions.push(queryHistoryConfigurationListener);
const showResults = async (item: FullCompletedQueryInfo) =>
const showResults = async (item: CompletedLocalQueryInfo) =>
showResultsForCompletedQuery(item, WebviewReveal.Forced);
const queryStorageDir = path.join(ctx.globalStorageUri.fsPath, 'queries');
await fs.ensureDir(queryStorageDir);
Expand All @@ -455,7 +455,7 @@ async function activateWithInstalledDistribution(
ctx,
queryHistoryConfigurationListener,
showResults,
async (from: FullCompletedQueryInfo, to: FullCompletedQueryInfo) =>
async (from: CompletedLocalQueryInfo, to: CompletedLocalQueryInfo) =>
showResultsForComparison(from, to),
);
await qhm.readQueryHistory();
Expand All @@ -479,8 +479,8 @@ async function activateWithInstalledDistribution(
archiveFilesystemProvider.activate(ctx);

async function showResultsForComparison(
from: FullCompletedQueryInfo,
to: FullCompletedQueryInfo
from: CompletedLocalQueryInfo,
to: CompletedLocalQueryInfo
): Promise<void> {
try {
await cmpm.showResults(from, to);
Expand All @@ -490,7 +490,7 @@ async function activateWithInstalledDistribution(
}

async function showResultsForCompletedQuery(
query: FullCompletedQueryInfo,
query: CompletedLocalQueryInfo,
forceReveal: WebviewReveal
): Promise<void> {
await intm.showResults(query, forceReveal, false);
Expand Down Expand Up @@ -520,7 +520,7 @@ async function activateWithInstalledDistribution(
token.onCancellationRequested(() => source.cancel());

const initialInfo = await createInitialQueryInfo(selectedQuery, databaseInfo, quickEval, range);
const item = new FullQueryInfo(initialInfo, queryHistoryConfigurationListener, source);
const item = new LocalQueryInfo(initialInfo, queryHistoryConfigurationListener, source);
qhm.addQuery(item);
try {
const completedQueryInfo = await compileAndRunQueryAgainstDatabase(
Expand All @@ -534,7 +534,7 @@ async function activateWithInstalledDistribution(
);
item.completeThisQuery(completedQueryInfo);
await qhm.writeQueryHistory();
await showResultsForCompletedQuery(item as FullCompletedQueryInfo, WebviewReveal.NotForced);
await showResultsForCompletedQuery(item as CompletedLocalQueryInfo, WebviewReveal.NotForced);
// Note we must update the query history view after showing results as the
// display and sorting might depend on the number of results
} catch (e) {
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
import { getDefaultResultSetName, ParsedResultSets } from './pure/interface-types';
import { RawResultSet, transformBqrsResultSet, ResultSetSchema } from './pure/bqrs-cli-types';
import { PAGE_SIZE } from './config';
import { FullCompletedQueryInfo } from './query-results';
import { CompletedLocalQueryInfo } from './query-results';

/**
* interface.ts
Expand Down Expand Up @@ -97,7 +97,7 @@ function numInterpretedPages(interpretation: Interpretation | undefined): number
}

export class InterfaceManager extends DisposableObject {
private _displayedQuery?: FullCompletedQueryInfo;
private _displayedQuery?: CompletedLocalQueryInfo;
private _interpretation?: Interpretation;
private _panel: vscode.WebviewPanel | undefined;
private _panelLoaded = false;
Expand Down Expand Up @@ -357,7 +357,7 @@ export class InterfaceManager extends DisposableObject {
* history entry.
*/
public async showResults(
fullQuery: FullCompletedQueryInfo,
fullQuery: CompletedLocalQueryInfo,
forceReveal: WebviewReveal,
shouldKeepOldResultsWhileRendering = false
): Promise<void> {
Expand Down
Loading