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

support presentation.showReuseMessage & clear in task config #7454

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

elaihau
Copy link
Contributor

@elaihau elaihau commented Mar 30, 2020

  • support presentation.showReuseMessage, which controls whether to show the "Terminal will be reused by tasks" message.
  • support presentation.clear, which controls whether the terminal is cleared before this task is run.

Signed-off-by: Liang Huang lhuang4@ualberta.ca

How to test

  1. Make sure neither showReuseMessage or clear is defined in the task config
  2. Start the task at least 2 times.
    Expected:
  • The Terminal will be reused by tasks shows up after task finishes
  • Every time the task is started, the terminal retains whatever it already has.
  1. Add showReuseMessage: false into the task config. Run task.
    Expected:
  • The Terminal will be reused by tasks does not show up after task finishes
  1. Add clear: true into the task config. Run task.
    Expected:
  • The terminal clears all its content before the task starts.

Peek 2020-03-30 15-41

Review checklist

- support presentation.showReuseMessage, which controls whether to show the "Terminal will be reused by tasks" message.
- support presentation.clear, which controls whether the terminal is cleared before this task is run.

Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified the changes and they look good 👍

  • clear=true successfully clears the terminal output before a new task is run
  • clear=false successfully preserves the terminal output when a new task is run
  • showReuseMessage=true successfully displays the reuse message
  • showReuseMessage=false successfully suppresses the reuse message

@@ -103,11 +104,11 @@ export class TaskTerminalWidgetManager {
terminal.taskConfig = taskConfig;
terminal.busy = true;
} else {
this.notifyTaskFinished(terminal);
this.notifyTaskFinished(terminal, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with being explicit and setting the reuse to true despite it being the default.

@vince-fugnitto vince-fugnitto added tasks issues related to the task system vscode issues related to VSCode compatibility labels Mar 30, 2020
Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with defined properties presentation.showReuseMessage, presentation.clear in configurations and without them (default behavior).
It works as expected for me!

@elaihau
Copy link
Contributor Author

elaihau commented Apr 2, 2020

Thank you @RomanNikitenko and @vince-fugnitto !

@elaihau elaihau merged commit ce39872 into master Apr 2, 2020
@elaihau elaihau deleted the Liang/taskPresentation_showMessage_clear branch April 2, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants