From 664d53a2118adfcf43b9d0738ef8c0bbcb80806f Mon Sep 17 00:00:00 2001 From: David de Hilster Date: Wed, 21 Feb 2024 10:48:06 -0500 Subject: [PATCH] feat: add refresh to the WU context menu Signed-off-by: David de Hilster --- package.json | 9 +++++++-- src/ecl/eclWatchTree.ts | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) 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..3c8eace 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.refresh(); + }); + vscode.commands.registerCommand("hpccPlatform.refresh", (element?: Item) => { this.refresh(element); });