Avoid AST Viewer for invalid selections
When a directory is selected or there are multiple selections, do not show the command.
This commit is contained in:
Родитель
d0bde800f7
Коммит
b237bafa2f
|
@ -2,12 +2,13 @@
|
|||
|
||||
## [UNRELEASED]
|
||||
|
||||
- Fix a bug where invoking _View AST_ from the file explorer would not view the selected file. Instead it would view the active editor. Also, prevent the _View AST_ from appearing if the current selection includes a directory or multiple files. [#1113](https://github.com/github/vscode-codeql/pull/1113)
|
||||
|
||||
## 1.5.10 - 25 January 2022
|
||||
|
||||
- Fix a bug where the results view moved column even when it was already visible. [#1070](https://github.com/github/vscode-codeql/pull/1070)
|
||||
- Add packaging-related commands. _CodeQL: Download Packs_ downloads query packs from the package registry that can be run locally, and _CodeQL: Install Pack Dependencies_ installs dependencies for packs in your workspace. [#1076](https://github.com/github/vscode-codeql/pull/1076)
|
||||
- Add query history items as soon as a query is run, including new icons for each history item. [#1094](https://github.com/github/vscode-codeql/pull/1094)
|
||||
- Fix a bug where invoking _View AST_ from the file explorer would not view the selected file. Instead it would view the active editor. [#1113](https://github.com/github/vscode-codeql/pull/1113)
|
||||
|
||||
## 1.5.9 - 17 December 2021
|
||||
|
||||
|
|
|
@ -735,7 +735,7 @@
|
|||
{
|
||||
"command": "codeQL.viewAst",
|
||||
"group": "9_qlCommands",
|
||||
"when": "resourceScheme == codeql-zip-archive"
|
||||
"when": "resourceScheme == codeql-zip-archive && !explorerResourceIsFolder && !listMultiSelection"
|
||||
},
|
||||
{
|
||||
"command": "codeQL.runQueries",
|
||||
|
|
|
@ -1002,9 +1002,8 @@ async function activateWithInstalledDistribution(
|
|||
ctx.subscriptions.push(commandRunnerWithProgress('codeQL.viewAst', async (
|
||||
progress: ProgressCallback,
|
||||
token: CancellationToken,
|
||||
selectedFile: Uri,
|
||||
selectedFile: Uri
|
||||
) => {
|
||||
|
||||
const ast = await templateProvider.provideAst(
|
||||
progress,
|
||||
token,
|
||||
|
|
Загрузка…
Ссылка в новой задаче