From a9544f4ef49769640ec8f0f3bc32f7c858619157 Mon Sep 17 00:00:00 2001 From: Vladyslav Zhukovskyi Date: Wed, 13 May 2020 17:46:42 +0300 Subject: [PATCH] Bind command for handling workbench.action.openRecent request Signed-off-by: Vladyslav Zhukovskyi --- .../src/browser/plugin-vscode-commands-contribution.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts index 1c095c8ac89ec..bfedf98f72d3b 100755 --- a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts +++ b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts @@ -53,6 +53,7 @@ import { Position } from '@theia/plugin-ext/lib/common/plugin-api-rpc'; import { URI } from 'vscode-uri'; import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; import { TerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution'; +import { QuickOpenWorkspace } from '@theia/workspace/lib/browser/quick-open-workspace'; export namespace VscodeCommands { export const OPEN: Command = { @@ -90,6 +91,8 @@ export class PluginVscodeCommandsContribution implements CommandContribution { protected readonly workspaceService: WorkspaceService; @inject(TerminalFrontendContribution) protected readonly terminalContribution: TerminalFrontendContribution; + @inject(QuickOpenWorkspace) + protected readonly quickOpenWorkspace: QuickOpenWorkspace; registerCommands(commands: CommandRegistry): void { commands.registerCommand(VscodeCommands.OPEN, { @@ -570,5 +573,11 @@ export class PluginVscodeCommandsContribution implements CommandContribution { commands.executeCommand('_executeProvideOutgoingCalls', { item })) } ); + + commands.registerCommand({ + id: 'workbench.action.openRecent' + }, { + execute: () => this.quickOpenWorkspace.select() + }); } }