support presentation.reveal and presentation.focus in task config #6812
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
put focus on the terminal if presentation.reveal = "always",
do not activate the terminal if presentation.reveal = "never",
when presentation.reveal = "silent", activate the terminal only if errors are found from the task output by the parser
when users start a task that is already active, put focus on the
terminal if presentation.focus = true, or presentation.reveal = "always"
Signed-off-by: Liang Huang lhuang4@ualberta.ca
How to test
3.1 adding "presentation": { "reveal": "always", "focus": false } to task config shouldn't change the behavior of Theia
3.2 having "presentation": { "reveal": "never", "focus": false } in task config should leave the terminal for the task not-focused
3.3 adding "presentation": { "reveal": "never", "focus": false } in a long running task, start the long running task, and start it one more time - the terminal should not be activated throughout all steps
3.4 adding "presentation": { "reveal": "never", "focus": true }, or "presentation": { "reveal": "always", "focus": false } in a long running task, and try the rest of 3.3 - the terminal should have the focus.
3.5 adding "presentation": { "reveal": "silent", "focus": false } in a task, run the task, if the task has no problem matcher defined, or finishes without having errors (warnings and infos are not considered errors), the terminal should not get focus
3.6 Replicate 3.5 with a task whose problem matcher finds errors from the task output - the terminal should get focus immediately after the first error is found.
Review checklist