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 440730fb20a6b..3305f3b3c9d8e 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 { DiffService } from '@theia/workspace/lib/browser/diff-service'; import { inject, injectable } from 'inversify'; import { Position } from '@theia/plugin-ext/lib/common/plugin-api-rpc'; import { URI } from 'vscode-uri'; +import { PluginServer } from '@theia/plugin-ext/lib/common/plugin-protocol'; 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'; @@ -106,6 +107,8 @@ export class PluginVscodeCommandsContribution implements CommandContribution { protected readonly terminalService: TerminalService; @inject(CodeEditorWidgetUtil) protected readonly codeEditorWidgetUtil: CodeEditorWidgetUtil; + @inject(PluginServer) + protected readonly pluginServer: PluginServer; registerCommands(commands: CommandRegistry): void { commands.registerCommand(VscodeCommands.OPEN, { @@ -208,6 +211,9 @@ export class PluginVscodeCommandsContribution implements CommandContribution { commands.registerCommand({ id: 'workbench.action.openSettings' }, { execute: () => commands.executeCommand(CommonCommands.OPEN_PREFERENCES.id) }); + commands.registerCommand({ id: 'workbench.extensions.installExtension' }, { + execute: (id: string) => this.pluginServer.deploy(id) + }); commands.registerCommand({ id: 'workbench.action.files.save', }, { execute: (uri?: monaco.Uri) => { if (uri) {