Skip to content

Commit

Permalink
Merge pull request #1574 from codefori/fix/objectBrowserRefresh
Browse files Browse the repository at this point in the history
Split Object browser's Refresh in two separate actions
  • Loading branch information
chrjorgensen authored Oct 5, 2023
2 parents 6a53f6c + e17108b commit 08e0d1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,12 @@
"category": "IBM i",
"icon": "$(refresh)"
},
{
"command": "code-for-ibmi.refreshObjectBrowserItem",
"enablement": "code-for-ibmi:connected",
"title": "Refresh",
"category": "IBM i"
},
{
"command": "code-for-ibmi.revealInObjectBrowser",
"enablement": "code-for-ibmi:connected",
Expand Down Expand Up @@ -1782,6 +1788,10 @@
{
"command": "code-for-ibmi.revealInObjectBrowser",
"when": "never"
},
{
"command": "code-for-ibmi.refreshObjectBrowserItem",
"when": "never"
}
],
"view/title": [
Expand Down Expand Up @@ -2124,6 +2134,11 @@
"when": "view == objectBrowser && viewItem == member",
"group": "3_memberTransfer@2"
},
{
"command": "code-for-ibmi.refreshObjectBrowserItem",
"when": "view == objectBrowser",
"group": "99_objectBrowserAction@1"
},
{
"command": "code-for-ibmi.moveIFSShortcutDown",
"when": "view == ifsBrowser && viewItem == shortcut",
Expand Down
4 changes: 3 additions & 1 deletion src/views/objectBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ export function initializeObjectBrowser(context: vscode.ExtensionContext) {
objectBrowser.autoRefresh();
}),

vscode.commands.registerCommand(`code-for-ibmi.refreshObjectBrowser`, async (item?: BrowserItem) => {
vscode.commands.registerCommand(`code-for-ibmi.refreshObjectBrowser`, () => objectBrowser.refresh()),

vscode.commands.registerCommand(`code-for-ibmi.refreshObjectBrowserItem`, async (item: BrowserItem) => {
objectBrowser.refresh(item);
}),

Expand Down

0 comments on commit 08e0d1a

Please sign in to comment.