Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated activateTerminal method #10521 #10529

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- add `isSafeToShutDown()` - replaces `canUnload()`.
- add `setSafeToShutDown()` - ensures that next close event will not be prevented.
- add `reload()` - to allow different handling in Electron and browser.
- [terminal] removed deprecated `activateTerminal` method in favor of `open`. [#10529](https://github.com/eclipse-theia/theia/pull/10529)

## v1.20.0 - 11/25/2021

Expand Down
2 changes: 1 addition & 1 deletion packages/task/src/browser/task-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ export class TaskService implements TaskConfigurationClient {
if (!terminal || terminal.kind !== 'user' || (await terminal.hasChildProcesses())) {
terminal = <TerminalWidget>await this.terminalService.newTerminal(<TerminalWidgetFactoryOptions>{ created: new Date().toString() });
await terminal.start();
this.terminalService.activateTerminal(terminal);
this.terminalService.open(terminal);
}
terminal.sendText(selectedText);
}
Expand Down
7 changes: 0 additions & 7 deletions packages/terminal/src/browser/base/terminal-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ export interface TerminalService {
*/
newTerminal(options: TerminalWidgetOptions): Promise<TerminalWidget>;

/**
* Display new terminal widget.
* @param terminal - widget to attach.
* @deprecated use #open
*/
activateTerminal(terminal: TerminalWidget): void;

open(terminal: TerminalWidget, options?: WidgetOpenerOptions): void;

readonly all: TerminalWidget[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
// Open terminal
const termWidget = await this.newTerminal({ cwd });
termWidget.start();
this.activateTerminal(termWidget);
this.open(termWidget);
}

registerMenus(menus: MenuModelRegistry): void {
Expand Down Expand Up @@ -602,10 +602,6 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
return widget;
}

activateTerminal(widget: TerminalWidget, widgetOptions?: ApplicationShell.WidgetOptions): void {
this.open(widget, { widgetOptions });
}

// TODO: reuse WidgetOpenHandler.open
open(widget: TerminalWidget, options?: WidgetOpenerOptions): void {
const op: WidgetOpenerOptions = {
Expand Down