diff --git a/package.json b/package.json index c13d6e0e4..7d241bd8d 100644 --- a/package.json +++ b/package.json @@ -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": [ @@ -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": [ @@ -2270,10 +2292,15 @@ "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", @@ -2281,7 +2308,7 @@ }, { "command": "code-for-ibmi.refreshObjectBrowser", - "group": "navigation@6", + "group": "navigation@7", "when": "view == objectBrowser" }, { @@ -2289,6 +2316,11 @@ "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", diff --git a/src/views/ifsBrowser.ts b/src/views/ifsBrowser.ts index b49c5a44e..f3f84b39f 100644 --- a/src/views/ifsBrowser.ts +++ b/src/views/ifsBrowser.ts @@ -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'); + }) ) } diff --git a/src/views/objectBrowser.ts b/src/views/objectBrowser.ts index ec9977aba..c4fea06b2 100644 --- a/src/views/objectBrowser.ts +++ b/src/views/objectBrowser.ts @@ -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'); }) ); }