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

[tasks] display message in terminal when executing a task #5332

Closed
vince-fugnitto opened this issue May 31, 2019 · 4 comments · Fixed by #7503
Closed

[tasks] display message in terminal when executing a task #5332

vince-fugnitto opened this issue May 31, 2019 · 4 comments · Fixed by #7503
Assignees
Labels
enhancement issues that are enhancements to current functionality - nice to haves tasks issues related to the task system

Comments

@vince-fugnitto
Copy link
Member

Description

The current message-service indicating when a task has been started / stopped can become quite annoying especially when multiple tasks are executed. Instead, we should adopt a more elegant solution and align with vscode which displays task information directly in the terminal
when started / stopped.

Screen Shot 2019-05-31 at 6 20 57 PM
@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves tasks issues related to the task system labels May 31, 2019
@elaihau
Copy link
Contributor

elaihau commented Dec 1, 2019

This requires the task code having access to the XTerm.

Given that Xterm is accessible from the TerminalWidgetImpl

getTerminal(): Xterm.Terminal {
return this.term;
}

but not exposed by the interface

export abstract class TerminalWidget extends BaseWidget {
abstract processId: Promise<number>;
/**
* Start terminal and return terminal id.
* @param id - terminal id.
*/
abstract start(id?: number): Promise<number>;
/**
* Send text to the terminal server.
* @param text - text content.
*/
abstract sendText(text: string): void;
abstract onDidOpen: Event<void>;
/**
* Event which fires when terminal did closed. Event value contains closed terminal widget definition.
*/
abstract onTerminalDidClose: Event<TerminalWidget>;
/**
* Cleat terminal output.
*/
abstract clearOutput(): void;
}

could I simply add getTerminal(): Xterm.Terminal to the TerminalWidget interface ? @akosyakov

Thank you !

@vince-fugnitto
Copy link
Member Author

@elaihau I was able to do a POC by simply sending text to the terminal, I think it's enough? Did you mean it's difficult right now to do it for an existing terminal? (before it's created)

@elaihau
Copy link
Contributor

elaihau commented Dec 2, 2019

@vince-fugnitto I managed sending texts to the terminal. atm I am trying to figure out how to send text the terminal at the right timing.

I tried to use

onDidStartTaskProcess(event: TaskInfo): void {
and it didn't work at all. This must be a bug .

@elaihau
Copy link
Contributor

elaihau commented Mar 26, 2020

Finishing up this one requires the change in #6836 to get merged.

elaihau added a commit that referenced this issue Apr 5, 2020
- add the suppport of having `echo` property in the `presentation`
object in the task configuration. When `echo` is false, Theia does not print the executed command in the terminal.

- resolves #5332

Signed-off-by: Liang Huang <[email protected]>
elaihau added a commit that referenced this issue Apr 5, 2020
- add the suppport of having `echo` property in the `presentation`
object in the task configuration. When `echo` is false, Theia does not print the executed command in the terminal.

- resolves #5332

Signed-off-by: Liang Huang <[email protected]>
elaihau added a commit that referenced this issue Apr 15, 2020
- add the suppport of having `echo` property in the `presentation`
object in the task configuration. When `echo` is false, Theia does not print the executed command in the terminal.

- resolves #5332

Signed-off-by: Liang Huang <[email protected]>
elaihau added a commit that referenced this issue Apr 17, 2020
- add the suppport of having `echo` property in the `presentation`
object in the task configuration. When `echo` is false, Theia does not print the executed command in the terminal.

- resolves #5332

Signed-off-by: Liang Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves tasks issues related to the task system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants