From 7a5b62d81fab246fc20904df015a158775332b83 Mon Sep 17 00:00:00 2001 From: Estelle Foisy Date: Thu, 8 Sep 2022 11:37:18 -0400 Subject: [PATCH] add missing deprecated show overload Add an old deprecated overload signature for OutputChannel.show in theia.d.ts and update the implementation accordingly. --- .../src/plugin/output-channel/output-channel-item.ts | 5 ++++- packages/plugin/src/theia.d.ts | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/plugin-ext/src/plugin/output-channel/output-channel-item.ts b/packages/plugin-ext/src/plugin/output-channel/output-channel-item.ts index 20d9a99d07b0a..cdb97f86e9947 100644 --- a/packages/plugin-ext/src/plugin/output-channel/output-channel-item.ts +++ b/packages/plugin-ext/src/plugin/output-channel/output-channel-item.ts @@ -52,8 +52,11 @@ export class OutputChannelImpl implements theia.OutputChannel { this.proxy.$clear(this.name); } - show(preserveFocus: boolean | undefined): void { + show(preserveFocusOrColumn?: boolean | theia.ViewColumn, preserveFocus?: boolean): void { this.validate(); + if (typeof preserveFocusOrColumn === 'boolean') { + preserveFocus = preserveFocusOrColumn; + } this.proxy.$reveal(this.name, !!preserveFocus); } diff --git a/packages/plugin/src/theia.d.ts b/packages/plugin/src/theia.d.ts index 0ab3560fe71cc..7c65ff4319e75 100644 --- a/packages/plugin/src/theia.d.ts +++ b/packages/plugin/src/theia.d.ts @@ -2782,6 +2782,16 @@ export module '@theia/plugin' { */ clear(): void; + /** + * Reveal this channel in the UI. + * + * @deprecated Use the overload with just one parameter (`show(preserveFocus?: boolean): void`). + * + * @param column This argument is **deprecated** and will be ignored. + * @param preserveFocus When `true` the channel will not take focus. + */ + show(column?: ViewColumn, preserveFocus?: boolean): void; + /** * Reveal this channel in the UI. *