Renamed selectable context value (#1917)

This commit is contained in:
Charis Kyriakou
2023-01-03 12:34:24 +00:00
committed by GitHub
parent bbdbe01e03
commit bbbbb3a1ee
3 changed files with 3 additions and 3 deletions

View File

@@ -803,7 +803,7 @@
}, },
{ {
"command": "codeQLDatabasesExperimental.setSelectedItem", "command": "codeQLDatabasesExperimental.setSelectedItem",
"when": "view == codeQLDatabasesExperimental && viewItem == selectableDbItem", "when": "view == codeQLDatabasesExperimental && viewItem == canBeSelected",
"group": "inline" "group": "inline"
}, },
{ {

View File

@@ -38,7 +38,7 @@ export class DbTreeViewItem extends vscode.TreeItem {
this.resourceUri = vscode.Uri.parse(SELECTED_DB_ITEM_RESOURCE_URI); this.resourceUri = vscode.Uri.parse(SELECTED_DB_ITEM_RESOURCE_URI);
} else { } else {
// Define a context value to drive the UI to show an action to select the item. // Define a context value to drive the UI to show an action to select the item.
this.contextValue = "selectableDbItem"; this.contextValue = "canBeSelected";
} }
} }
} }

View File

@@ -852,7 +852,7 @@ describe("db panel", () => {
function isTreeViewItemSelectable(treeViewItem: DbTreeViewItem) { function isTreeViewItemSelectable(treeViewItem: DbTreeViewItem) {
return ( return (
treeViewItem.resourceUri === undefined && treeViewItem.resourceUri === undefined &&
treeViewItem.contextValue === "selectableDbItem" treeViewItem.contextValue === "canBeSelected"
); );
} }