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

[vscode] Support optional property TaskPresentationOptions#clear #11133 #11298

Merged

Conversation

jfaltermeier
Copy link
Contributor

@jfaltermeier jfaltermeier commented Jun 15, 2022

What it does

Adds the clear property to the API and the data transfer object.
The functionality was working already as far as I could see, since the flag was available on TaskOutputPresentation already and the conversion code kept this flag in.

Fixes #11133

Contributed on behalf of STMicroelectronics

How to test

I've created an extension (https://github.com/jfaltermeier/vscode-playground/blob/main/tasks-clear/src/extension.ts, https://github.com/jfaltermeier/vscode-playground/releases/download/tasks-clear-0.0.1/tasks-clear-0.0.1.vsix) that adds two commands, "Task with clear" and "Task without clear",
Both will execute a task programmatically that will print text to the terminal. The terminal is cleared depending on the clear flag.

I've also checked with a tasks.json-file:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
      {
        "label": "Task with clear",
        "type": "shell",
        "command": "echo 1 && echo 2 && echo 3",
        "presentation": {
          "reveal": "always",
          "panel": "shared",
          "clear": true
        },
        "problemMatcher": []
      },
      {
        "label": "Task without clear",
        "type": "shell",
        "command": "echo 1 && echo 2 && echo 3",
        "presentation": {
          "reveal": "always",
          "panel": "shared",
          "clear": false
        },
        "problemMatcher": []
      },
    ]
  }
  

Review checklist

Reminder for reviewers

@jfaltermeier jfaltermeier force-pushed the 11133-taskTerminalClear branch 2 times, most recently from 95bf6de to cfdb372 Compare June 15, 2022 10:27
@jfaltermeier jfaltermeier marked this pull request as ready for review June 15, 2022 10:54
@msujew msujew self-requested a review June 15, 2022 11:52
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I can confirm that the changes align the TaskPresentationOptions#clear property to vscode. The functionality of the property continues to work as expected 👍

@vince-fugnitto vince-fugnitto added tasks issues related to the task system vscode issues related to VSCode compatibility labels Jun 15, 2022
@msujew
Copy link
Member

msujew commented Jun 16, 2022

@jfaltermeier There are merge conflicts, I assume related to the changelog entry. Do you mind resolving those, I'll then try to merge this PR in a timely manner.

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.

LGTM 👍

@JonasHelming
Copy link
Contributor

@jfaltermeier There are merge conflicts, I assume related to the changelog entry. Do you mind resolving those, I'll then try to merge this PR in a timely manner.

Any reason why @jfaltermeier should not merge himselve after resolving the conflict? @msujew ?

@msujew
Copy link
Member

msujew commented Jun 16, 2022

@JonasHelming I forgot that he's a member of the team. Kind of hard keeping up with all you EclipseSource folks in the project ;)

…pse-theia#11133

* extend theia.d.ts and DTOs accordingly
* conversion to actual internal API work out of the box already because
clear? was available already

Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>

Contributed on behalf of STMicroelectronics
@jfaltermeier jfaltermeier merged commit 024d871 into eclipse-theia:master Jun 17, 2022
@vince-fugnitto vince-fugnitto added this to the 1.27.0 milestone Jun 30, 2022
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.

[vscode] Support optional property TaskPresentationOptions#clear
4 participants