Skip to content

Commit 5f8ec14

Browse files
Merge branch 'main' into elena/yer-a-flag-query
2 parents aa2ecee + 7f3f338 commit 5f8ec14

File tree

12 files changed

+207
-247
lines changed

12 files changed

+207
-247
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Added ability to filter repositories for a variant analysis to only those that have results [#2343](https://github.com/github/vscode-codeql/pull/2343)
66
- Add new configuration option to allow downloading databases from http, non-secure servers. [#2332](https://github.com/github/vscode-codeql/pull/2332)
7+
- Remove title actions from the query history panel that depended on history items being selected. [#2350](https://github.com/github/vscode-codeql/pull/2350)
78

89
## 1.8.2 - 12 April 2023
910

extensions/ql-vscode/package.json

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,6 @@
633633
"command": "codeQL.checkForUpdatesToCLI",
634634
"title": "CodeQL: Check for CLI Updates"
635635
},
636-
{
637-
"command": "codeQLQueryHistory.openQueryTitleMenu",
638-
"title": "View Query",
639-
"icon": "$(edit)"
640-
},
641636
{
642637
"command": "codeQLQueryHistory.openQueryContextMenu",
643638
"title": "View Query",
@@ -648,11 +643,6 @@
648643
"title": "Open Query Results",
649644
"icon": "$(preview)"
650645
},
651-
{
652-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
653-
"title": "Delete",
654-
"icon": "$(trash)"
655-
},
656646
{
657647
"command": "codeQLQueryHistory.removeHistoryItemContextMenu",
658648
"title": "Delete",
@@ -853,21 +843,6 @@
853843
"when": "view == codeQLDatabases",
854844
"group": "navigation"
855845
},
856-
{
857-
"command": "codeQLQueryHistory.openQueryTitleMenu",
858-
"when": "view == codeQLQueryHistory",
859-
"group": "navigation"
860-
},
861-
{
862-
"command": "codeQLQueryHistory.itemClicked",
863-
"when": "view == codeQLQueryHistory",
864-
"group": "navigation"
865-
},
866-
{
867-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
868-
"when": "view == codeQLQueryHistory",
869-
"group": "navigation"
870-
},
871846
{
872847
"command": "codeQLQueryHistory.sortByName",
873848
"when": "view == codeQLQueryHistory",
@@ -1310,18 +1285,10 @@
13101285
"command": "codeQLDatabases.upgradeDatabase",
13111286
"when": "false"
13121287
},
1313-
{
1314-
"command": "codeQLQueryHistory.openQueryTitleMenu",
1315-
"when": "false"
1316-
},
13171288
{
13181289
"command": "codeQLQueryHistory.openQueryContextMenu",
13191290
"when": "false"
13201291
},
1321-
{
1322-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
1323-
"when": "false"
1324-
},
13251292
{
13261293
"command": "codeQLQueryHistory.removeHistoryItemContextMenu",
13271294
"when": "false"

extensions/ql-vscode/src/ast-cfg-commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
TemplatePrintCfgProvider,
77
} from "./contextual/templateProvider";
88
import { AstCfgCommands } from "./common/commands";
9-
import { LocalQueries } from "./local-queries";
9+
import { LocalQueries } from "./local-queries/local-queries";
1010

1111
type AstCfgOptions = {
1212
localQueries: LocalQueries;

extensions/ql-vscode/src/common/commands.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,6 @@ import type {
1313
} from "../variant-analysis/shared/variant-analysis";
1414
import type { QLDebugConfiguration } from "../debugger/debug-configuration";
1515

16-
// A command function matching the signature that VS Code calls when
17-
// a command is invoked from the title bar of a TreeView with
18-
// canSelectMany set to true.
19-
//
20-
// It is possible to get any combination of singleItem and multiSelect
21-
// to be undefined. This is because it is possible to click a title bar
22-
// option without interacting with any individual items first, or even
23-
// when there are no items present at all.
24-
// If both singleItem and multiSelect are defined, then singleItem will
25-
// be contained within multiSelect.
26-
export type TreeViewTitleMultiSelectionCommandFunction<Item> = (
27-
singleItem: Item | undefined,
28-
multiSelect: Item[] | undefined,
29-
) => Promise<void>;
30-
3116
// A command function matching the signature that VS Code calls when
3217
// a command is invoked from a context menu on a TreeView with
3318
// canSelectMany set to true.
@@ -176,9 +161,7 @@ export type QueryHistoryCommands = {
176161
"codeQLQueryHistory.sortByCount": () => Promise<void>;
177162

178163
// Commands in the context menu or in the hover menu
179-
"codeQLQueryHistory.openQueryTitleMenu": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
180164
"codeQLQueryHistory.openQueryContextMenu": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
181-
"codeQLQueryHistory.removeHistoryItemTitleMenu": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
182165
"codeQLQueryHistory.removeHistoryItemContextMenu": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
183166
"codeQLQueryHistory.removeHistoryItemContextInline": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
184167
"codeQLQueryHistory.renameItem": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
@@ -195,7 +178,7 @@ export type QueryHistoryCommands = {
195178
"codeQLQueryHistory.viewCsvAlerts": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
196179
"codeQLQueryHistory.viewSarifAlerts": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
197180
"codeQLQueryHistory.viewDil": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
198-
"codeQLQueryHistory.itemClicked": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
181+
"codeQLQueryHistory.itemClicked": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
199182
"codeQLQueryHistory.openOnGithub": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
200183
"codeQLQueryHistory.copyRepoList": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
201184

extensions/ql-vscode/src/debugger/debug-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
WorkspaceFolder,
66
} from "vscode";
77
import { getOnDiskWorkspaceFolders, showAndLogErrorMessage } from "../helpers";
8-
import { LocalQueries } from "../local-queries";
8+
import { LocalQueries } from "../local-queries/local-queries";
99
import { getQuickEvalContext, validateQueryPath } from "../run-queries-shared";
1010
import * as CodeQLProtocol from "./debug-protocol";
1111
import { getErrorMessage } from "../pure/helpers-pure";

extensions/ql-vscode/src/debugger/debugger-factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ProviderResult,
1010
} from "vscode";
1111
import { isCanary } from "../config";
12-
import { LocalQueries } from "../local-queries";
12+
import { LocalQueries } from "../local-queries/local-queries";
1313
import { DisposableObject } from "../pure/disposable-object";
1414
import { QueryRunner } from "../queryRunner";
1515
import { QLDebugConfigurationProvider } from "./debug-configuration";

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from "vscode";
1010
import { DebuggerCommands } from "../common/commands";
1111
import { DatabaseManager } from "../local-databases";
12-
import { LocalQueries, LocalQueryRun } from "../local-queries";
12+
import { LocalQueries } from "../local-queries/local-queries";
1313
import { DisposableObject } from "../pure/disposable-object";
1414
import { CoreQueryResults } from "../queryRunner";
1515
import {
@@ -20,6 +20,7 @@ import {
2020
import { QLResolvedDebugConfiguration } from "./debug-configuration";
2121
import * as CodeQLProtocol from "./debug-protocol";
2222
import { App } from "../common/app";
23+
import { LocalQueryRun } from "../local-queries/local-query-run";
2324

2425
/**
2526
* Listens to messages passing between VS Code and the debug adapter, so that we can supplement the

extensions/ql-vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ import {
117117
PreActivationCommands,
118118
QueryServerCommands,
119119
} from "./common/commands";
120-
import { LocalQueries } from "./local-queries";
120+
import { LocalQueries } from "./local-queries/local-queries";
121121
import { getAstCfgCommands } from "./ast-cfg-commands";
122122
import { getQueryEditorCommands } from "./query-editor";
123123
import { App } from "./common/app";

0 commit comments

Comments
 (0)