diff --git a/package.json b/package.json index 9ef9b5d..5987f3e 100644 --- a/package.json +++ b/package.json @@ -505,7 +505,7 @@ "title": "%Front%" }, { - "command": "hpccPlatform.refresh", + "command": "hpccPlatform.userRefresh", "category": "ECL", "title": "%Refresh%", "description": "%Refresh Tree%", @@ -949,7 +949,7 @@ "group": "navigation@20" }, { - "command": "hpccPlatform.refresh", + "command": "hpccPlatform.userRefresh", "when": "view == hpccPlatform", "group": "navigation@40" }, @@ -1060,6 +1060,11 @@ "submenu": "setPriority", "group": "5action@900" }, + { + "when": "view == hpccPlatform && viewItem =~ /ECLWUNode/", + "command": "hpccPlatform.userRefresh", + "group": "6action@900" + }, { "command": "hpccResources.bundles.homepage", "when": "view == hpccResources.bundles && viewItem =~ /^BundlesItem/", diff --git a/src/ecl/eclWatchTree.ts b/src/ecl/eclWatchTree.ts index 25a3db5..a631d2b 100644 --- a/src/ecl/eclWatchTree.ts +++ b/src/ecl/eclWatchTree.ts @@ -57,6 +57,10 @@ export class ECLWatchTree extends Tree { this.refresh(); }); + vscode.commands.registerCommand("hpccPlatform.userRefresh", () => { + this.userRefresh(); + }); + vscode.commands.registerCommand("hpccPlatform.refresh", (element?: Item) => { this.refresh(element); }); @@ -182,6 +186,10 @@ export class ECLWatchTree extends Tree { vscode.commands.executeCommand("setContext", "hpccPlatform.isAllWorkunits", !this._myWorkunits); } + userRefresh(): void { + this.refresh(); + } + refresh(element?: Item): void { this.updateMenu(); super.refresh(element);