From 0061a08c4c14ec09f8b99af2460278c71d21282b Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Thu, 7 Feb 2019 17:28:56 +0100 Subject: [PATCH] Add a "Reload configurations" command --- package.json | 13 ++++++++++++- src/extension.ts | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3529e7d..bd6536c 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,11 @@ "command": "sshfs.delete", "title": "Delete configuration", "category": "SSH FS" + }, + { + "command": "sshfs.reload", + "title": "Reload configurations", + "category": "SSH FS" } ], "menus": { @@ -135,6 +140,12 @@ "configuration": { "title": "SSH FS Configuration", "properties": { + "sshfs.configpaths": { + "default": [], + "description": "Location of JSON files to load configs from", + "type": "array", + "items": "string" + }, "sshfs.configs": { "definitions": { "fields": { @@ -436,4 +447,4 @@ "ssh2": "^0.8.2", "winreg": "^1.2.4" } -} +} \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 4c5ec57..e07bed0 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -63,5 +63,7 @@ export function activate(context: vscode.ExtensionContext) { registerCommand('sshfs.configure', (name?: string) => pickAndClick(manager.commandConfigure, name)); registerCommand('sshfs.delete', (name?: string) => pickAndClick(manager.commandDelete, name)); + registerCommand('sshfs.reload', loadConfigs); + vscode.window.createTreeView('sshfs-configs', { treeDataProvider: manager }); }