From d3f28179a3c75655544aaa7a5c55b0bbe94658ba Mon Sep 17 00:00:00 2001 From: odelia Date: Wed, 6 Jan 2021 15:50:35 +0200 Subject: [PATCH] added `createDeployQuickOpenItem` method to create `DeployQuickOpenItem` in order to make extension deploy command extensible Signed-off-by: odelia --- CHANGELOG.md | 4 ++++ .../src/main/browser/plugin-ext-deploy-command.ts | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba10616e1aadf..6e4fcaea00e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v1.10.0 + +- [plugin] added `createDeployQuickOpenItem` method to create `DeployQuickOpenItem` in order to make extension deploy command extensible [#8919] (https://github.com/eclipse-theia/theia/pull/8919) + ## v1.9.0 - 16/12/2020 - [cli] updated error reporting for the `download-plugins` script [#8798](https://github.com/eclipse-theia/theia/pull/8798) diff --git a/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts b/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts index ce35bcfc0e7d0..d6ac84bf19371 100644 --- a/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts +++ b/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts @@ -65,11 +65,15 @@ export class PluginExtDeployCommandService implements QuickOpenModel { public async onType(lookFor: string, acceptor: (items: QuickOpenItem[]) => void): Promise { this.items = []; if (lookFor || lookFor.length > 0) { - this.items.push(new DeployQuickOpenItem(lookFor, this.pluginServer, 'Deploy this plugin')); + this.items.push(this.createDeployQuickOpenItem(lookFor, 'Deploy this plugin')); } acceptor(this.items); } + protected createDeployQuickOpenItem(name: string, description: string): DeployQuickOpenItem { + return new DeployQuickOpenItem(name, this.pluginServer, description); + } + } export class DeployQuickOpenItem extends QuickOpenItem {