Skip to content

Commit

Permalink
Merge pull request #2043 from julesyan/searchBrowsers
Browse files Browse the repository at this point in the history
Add shortcut to search object and IFS browsers
  • Loading branch information
sebjulliand authored May 13, 2024
2 parents c213ab3 + 5f44f83 commit 1aacb59
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
36 changes: 34 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,20 @@
"category": "IBM i",
"icon": "$(settings-gear)",
"enablement": "!code-for-ibmi:debugWorking"
},
{
"command": "code-for-ibmi.searchObjectBrowser",
"title": "Highlight",
"category": "IBM i",
"icon": "$(search-fuzzy)",
"enablement": "code-for-ibmi:connected"
},
{
"command": "code-for-ibmi.searchIFSBrowser",
"title": "Highlight",
"category": "IBM i",
"icon": "$(search-fuzzy)",
"enablement": "code-for-ibmi:connected"
}
],
"keybindings": [
Expand Down Expand Up @@ -2171,6 +2185,14 @@
{
"command": "code-for-ibmi.debug.open.service.config",
"when": "never"
},
{
"command": "code-for-ibmi.searchObjectBrowser",
"when": "never"
},
{
"command": "code-for-ibmi.searchIFSBrowser",
"when": "never"
}
],
"view/title": [
Expand Down Expand Up @@ -2270,25 +2292,35 @@
"when": "view == ifsBrowser"
},
{
"command": "code-for-ibmi.refreshIFSBrowser",
"command": "code-for-ibmi.searchIFSBrowser",
"group": "navigation@1",
"when": "view == ifsBrowser"
},
{
"command": "code-for-ibmi.refreshIFSBrowser",
"group": "navigation@2",
"when": "view == ifsBrowser"
},
{
"command": "code-for-ibmi.createLibrary",
"group": "navigation@3",
"when": "view == objectBrowser"
},
{
"command": "code-for-ibmi.refreshObjectBrowser",
"group": "navigation@6",
"group": "navigation@7",
"when": "view == objectBrowser"
},
{
"command": "code-for-ibmi.sortFilters",
"group": "navigation@5",
"when": "view == objectBrowser"
},
{
"command": "code-for-ibmi.searchObjectBrowser",
"group": "navigation@6",
"when": "view == objectBrowser"
},
{
"command": "code-for-ibmi.closeSearchView",
"group": "navigation@2",
Expand Down
5 changes: 5 additions & 0 deletions src/views/ifsBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,11 @@ export function initializeIFSBrowser(context: vscode.ExtensionContext) {
vscode.commands.registerCommand(`code-for-ibmi.ifs.copyPath`, async (node: IFSItem) => {
await vscode.env.clipboard.writeText(node.path);
}),

vscode.commands.registerCommand(`code-for-ibmi.searchIFSBrowser`, async() => {
vscode.commands.executeCommand('ifsBrowser.focus');
vscode.commands.executeCommand('list.find');
})
)
}

Expand Down
5 changes: 5 additions & 0 deletions src/views/objectBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,11 @@ export function initializeObjectBrowser(context: vscode.ExtensionContext) {
}
}
}
}),

vscode.commands.registerCommand(`code-for-ibmi.searchObjectBrowser`, async() => {
vscode.commands.executeCommand('objectBrowser.focus');
vscode.commands.executeCommand('list.find');
})
);
}
Expand Down

0 comments on commit 1aacb59

Please sign in to comment.