mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
adds close workspace to data workspace view menu (#13809)
* adds close workspace to data workspace view menu * moving vscode command out to main * update context menu groups
This commit is contained in:
committed by
GitHub
parent
c7303803ba
commit
786d526e9c
@@ -57,6 +57,12 @@
|
||||
"category": "",
|
||||
"icon": "$(refresh)"
|
||||
},
|
||||
{
|
||||
"command": "dataworkspace.close",
|
||||
"title": "%close-workspace-command%",
|
||||
"category": "",
|
||||
"icon": "$(close)"
|
||||
},
|
||||
{
|
||||
"command": "projects.removeProject",
|
||||
"title": "%remove-project-command%"
|
||||
@@ -67,17 +73,22 @@
|
||||
{
|
||||
"command": "dataworkspace.refresh",
|
||||
"when": "view == dataworkspace.views.main",
|
||||
"group": "secondary"
|
||||
"group": "2_currentWorkspace"
|
||||
},
|
||||
{
|
||||
"command": "dataworkspace.close",
|
||||
"when": "view == dataworkspace.views.main && workbenchState == workspace",
|
||||
"group": "3_commands"
|
||||
},
|
||||
{
|
||||
"command": "projects.new",
|
||||
"when": "view == dataworkspace.views.main",
|
||||
"group": "navigation"
|
||||
"group": "1_navigation"
|
||||
},
|
||||
{
|
||||
"command": "projects.openExisting",
|
||||
"when": "view == dataworkspace.views.main",
|
||||
"group": "navigation"
|
||||
"group": "1_navigation"
|
||||
}
|
||||
],
|
||||
"commandPalette": [
|
||||
@@ -88,6 +99,10 @@
|
||||
"command": "dataworkspace.refresh",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "dataworkspace.close",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "projects.removeProject",
|
||||
"when": "false"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"main-view-name": "Projects",
|
||||
"new-command": "New",
|
||||
"refresh-workspace-command": "Refresh",
|
||||
"close-workspace-command": "Close Workspace",
|
||||
"remove-project-command": "Remove Project",
|
||||
"projects-view-no-workspace-content": "No workspace open, create new or open existing to get started.\n[Create new](command:projects.new)\n[Open existing](command:projects.openExisting)\nTo learn more about SQL Database projects [read our docs](https://aka.ms/azuredatastudio-sqlprojects)",
|
||||
"projects-view-no-project-content": "No projects found in current workspace.\n[Create new](command:projects.new)\n[Open existing](command:projects.openExisting)\nTo learn more about SQL Database projects [read our docs](https://aka.ms/azuredatastudio-sqlprojects).\n",
|
||||
|
||||
@@ -35,6 +35,9 @@ export function activate(context: vscode.ExtensionContext): Promise<IExtension>
|
||||
context.subscriptions.push(vscode.commands.registerCommand('dataworkspace.refresh', () => {
|
||||
workspaceTreeDataProvider.refresh();
|
||||
}));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('dataworkspace.close', () => {
|
||||
vscode.commands.executeCommand('workbench.action.closeFolder');
|
||||
}));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('projects.removeProject', async (treeItem: WorkspaceTreeItem) => {
|
||||
await workspaceService.removeProject(vscode.Uri.file(treeItem.element.project.projectFilePath));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user