Skip to content

Commit c2717d7

Browse files
authored
Merge branch 'master' into jcreed/jump-to-def-release
2 parents 6db5148 + 74e42b8 commit c2717d7

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

extensions/ql-vscode/src/databases-ui.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export class DatabaseUI extends DisposableObject {
174174
this.treeDataProvider = this.push(new DatabaseTreeDataProvider(ctx, databaseManager));
175175
this.push(window.createTreeView('codeQLDatabases', { treeDataProvider: this.treeDataProvider }));
176176

177+
logger.log('Registering database panel commands.');
177178
ctx.subscriptions.push(commands.registerCommand('codeQLDatabases.chooseDatabaseFolder', this.handleChooseDatabaseFolder));
178179
ctx.subscriptions.push(commands.registerCommand('codeQLDatabases.chooseDatabaseArchive', this.handleChooseDatabaseArchive));
179180
ctx.subscriptions.push(commands.registerCommand('codeQLDatabases.chooseDatabaseInternet', this.handleChooseDatabaseInternet));

extensions/ql-vscode/src/extension.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,31 +250,39 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
250250
// of activation.
251251
errorStubs.forEach(stub => stub.dispose());
252252

253+
logger.log('Initializing configuration listener...');
253254
const qlConfigurationListener = await QueryServerConfigListener.createQueryServerConfigListener(distributionManager);
254255
ctx.subscriptions.push(qlConfigurationListener);
255256

257+
logger.log('Initializing CodeQL cli server...');
256258
const cliServer = new CodeQLCliServer(distributionManager, logger);
257259
ctx.subscriptions.push(cliServer);
258260

261+
logger.log('Initializing query server client.');
259262
const qs = new qsClient.QueryServerClient(qlConfigurationListener, cliServer, {
260263
logger: queryServerLogger,
261264
}, task => Window.withProgress({ title: 'CodeQL query server', location: ProgressLocation.Window }, task));
262265
ctx.subscriptions.push(qs);
263266
await qs.startQueryServer();
264267

268+
logger.log('Initializing database manager.');
265269
const dbm = new DatabaseManager(ctx, qlConfigurationListener, logger);
266270
ctx.subscriptions.push(dbm);
271+
logger.log('Initializing database panel.');
267272
const databaseUI = new DatabaseUI(ctx, cliServer, dbm, qs, getContextStoragePath(ctx));
268273
ctx.subscriptions.push(databaseUI);
269274

275+
logger.log('Initializing query history manager.');
270276
const queryHistoryConfigurationListener = new QueryHistoryConfigListener();
271277
const qhm = new QueryHistoryManager(
272278
ctx,
273279
queryHistoryConfigurationListener,
274280
async item => showResultsForCompletedQuery(item, WebviewReveal.Forced)
275281
);
282+
logger.log('Initializing results panel interface.');
276283
const intm = new InterfaceManager(ctx, dbm, cliServer, queryServerLogger);
277284
ctx.subscriptions.push(intm);
285+
logger.log('Initializing source archive filesystem provider.');
278286
archiveFilesystemProvider.activate(ctx);
279287

280288
async function showResultsForCompletedQuery(query: CompletedQuery, forceReveal: WebviewReveal): Promise<void> {
@@ -305,6 +313,7 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
305313

306314
ctx.subscriptions.push(tmpDirDisposal);
307315

316+
logger.log('Initializing CodeQL language server.');
308317
const client = new LanguageClient('CodeQL Language Server', () => spawnIdeServer(qlConfigurationListener), {
309318
documentSelector: [
310319
{ language: 'ql', scheme: 'file' },
@@ -317,6 +326,7 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
317326
outputChannel: ideServerLogger.outputChannel
318327
}, true);
319328

329+
logger.log('Initializing QLTest interface.');
320330
const testExplorerExtension = extensions.getExtension<TestHub>(testExplorerExtensionId);
321331
if (testExplorerExtension) {
322332
const testHub = testExplorerExtension.exports;
@@ -327,6 +337,7 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
327337
ctx.subscriptions.push(testUIService);
328338
}
329339

340+
logger.log('Registering top-level command palette commands.');
330341
ctx.subscriptions.push(commands.registerCommand('codeQL.runQuery', async (uri: Uri | undefined) => await compileAndRunQuery(false, uri)));
331342
ctx.subscriptions.push(commands.registerCommand('codeQL.quickEval', async (uri: Uri | undefined) => await compileAndRunQuery(true, uri)));
332343
ctx.subscriptions.push(commands.registerCommand('codeQL.quickQuery', async () => displayQuickQuery(ctx, cliServer, databaseUI)));
@@ -338,9 +349,11 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
338349
ctx.subscriptions.push(commands.registerCommand('codeQL.chooseDatabaseArchive', () => databaseUI.handleChooseDatabaseArchive()));
339350
ctx.subscriptions.push(commands.registerCommand('codeQL.chooseDatabaseInternet', () => databaseUI.handleChooseDatabaseInternet()));
340351

352+
logger.log('Starting language server.');
341353
ctx.subscriptions.push(client.start());
342354

343355
// Jump-to-definition and find-references
356+
logger.log('Registering jump-to-definition handlers.');
344357
languages.registerDefinitionProvider(
345358
{ scheme: archiveFilesystemProvider.zipArchiveScheme },
346359
new TemplateQueryDefinitionProvider(cliServer, qs, dbm)
@@ -350,6 +363,7 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
350363
new TemplateQueryReferenceProvider(cliServer, qs, dbm)
351364
);
352365

366+
logger.log('Successfully finished extension initialization.');
353367
}
354368

355369
function getContextStoragePath(ctx: ExtensionContext) {

extensions/ql-vscode/src/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export class InterfaceManager extends DisposableObject {
138138
this.handleSelectionChange.bind(this)
139139
)
140140
);
141+
logger.log('Registering path-step navigation commands.');
141142
this.push(
142143
vscode.commands.registerCommand(
143144
"codeQLQueryResults.nextPathStep",

extensions/ql-vscode/src/query-history.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export class QueryHistoryManager {
290290
this.updateTreeViewSelectionIfVisible();
291291
}
292292
});
293+
logger.log('Registering query history panel commands.');
293294
ctx.subscriptions.push(vscode.commands.registerCommand('codeQLQueryHistory.openQuery', this.handleOpenQuery));
294295
ctx.subscriptions.push(vscode.commands.registerCommand('codeQLQueryHistory.removeHistoryItem', this.handleRemoveHistoryItem.bind(this)));
295296
ctx.subscriptions.push(vscode.commands.registerCommand('codeQLQueryHistory.setLabel', this.handleSetLabel.bind(this)));

extensions/ql-vscode/src/test-ui.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TestTreeNode } from './test-tree-node';
55
import { DisposableObject, UIService } from 'semmle-vscode-utils';
66
import { TestHub, TestController, TestAdapter, TestRunStartedEvent, TestRunFinishedEvent, TestEvent, TestSuiteEvent } from 'vscode-test-adapter-api';
77
import { QLTestAdapter, getExpectedFile, getActualFile } from './test-adapter';
8+
import { logger } from './logging';
89

910
type VSCodeTestEvent = TestRunStartedEvent | TestRunFinishedEvent | TestSuiteEvent | TestEvent;
1011

@@ -32,6 +33,7 @@ export class TestUIService extends UIService implements TestController {
3233
constructor(private readonly testHub: TestHub) {
3334
super();
3435

36+
logger.log('Registering CodeQL test panel commands.');
3537
this.registerCommand('codeQLTests.showOutputDifferences', this.showOutputDifferences);
3638
this.registerCommand('codeQLTests.acceptOutput', this.acceptOutput);
3739

0 commit comments

Comments
 (0)