From b0ed2acfff8cf823f3e794bbc5a8dead8cc9c6da Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Tue, 6 Apr 2021 10:48:41 -0400 Subject: [PATCH] custom-editor: remove 'editor-preview` coupling The following commit removes the unnecessary coupling to `@theia/editor-preview` from `custom-editor` functionality contributed by the plugin-system. Adding the coupling was a breaking change for downstream applications who were not expecting `@theia/editor-preview` from being contributed, and meant it was difficult to opt-out. The coupling was introduced to add unused typing so it is safe to remove. Signed-off-by: vince-fugnitto --- packages/plugin-ext/compile.tsconfig.json | 3 --- packages/plugin-ext/package.json | 1 - .../src/main/browser/custom-editors/custom-editor-opener.tsx | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/plugin-ext/compile.tsconfig.json b/packages/plugin-ext/compile.tsconfig.json index 259bba12f5f86..3238f0d8c356a 100644 --- a/packages/plugin-ext/compile.tsconfig.json +++ b/packages/plugin-ext/compile.tsconfig.json @@ -73,9 +73,6 @@ }, { "path": "../workspace/compile.tsconfig.json" - }, - { - "path": "../editor-preview/compile.tsconfig.json" } ] } diff --git a/packages/plugin-ext/package.json b/packages/plugin-ext/package.json index fba5cf15d9bd4..06183a8c9edd2 100644 --- a/packages/plugin-ext/package.json +++ b/packages/plugin-ext/package.json @@ -10,7 +10,6 @@ "@theia/core": "1.12.0", "@theia/debug": "1.12.0", "@theia/editor": "1.12.0", - "@theia/editor-preview": "1.12.0", "@theia/file-search": "1.12.0", "@theia/filesystem": "1.12.0", "@theia/markers": "1.12.0", diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx index e2a94975db670..9fc403fcb934f 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx @@ -15,7 +15,6 @@ ********************************************************************************/ import { inject } from '@theia/core/shared/inversify'; -import { PreviewEditorOpenerOptions } from '@theia/editor-preview/lib/browser'; import URI from '@theia/core/lib/common/uri'; import { ApplicationShell, OpenerOptions, OpenHandler, Widget, WidgetManager } from '@theia/core/lib/browser'; import { CustomEditorPriority, CustomEditorSelector } from '../../../common'; @@ -42,7 +41,7 @@ export class CustomEditorOpener implements OpenHandler { this.label = this.editor.displayName; } - canHandle(uri: URI, options?: PreviewEditorOpenerOptions): number { + canHandle(uri: URI): number { if (this.matches(this.editor.selector, uri)) { return this.getPriority(); }