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

set focus to terminal that the attached task is running from #7452

Merged
merged 1 commit into from
Apr 4, 2020

Conversation

elaihau
Copy link
Contributor

@elaihau elaihau commented Mar 30, 2020

Signed-off-by: Liang Huang [email protected]

How to test

  1. Start a long running task in a workspace
  2. Open the same workspace in a different browser (or browser tab).
  3. Attach the long running task in the browser opened in Step 2
  4. Repeat Step 3.
    Expected: Theia does not open new terminals in Step 4.

Peek 2020-03-30 15-14

Review checklist

@akosyakov akosyakov added tasks issues related to the task system terminal issues related to the terminal labels Mar 31, 2020
@elaihau elaihau force-pushed the Liang/attachTaskNotNewWidget branch from 74f9738 to 444f517 Compare April 1, 2020 02:04
@elaihau elaihau force-pushed the Liang/attachTaskNotNewWidget branch from 444f517 to 98216b5 Compare April 1, 2020 21:52
@RomanNikitenko RomanNikitenko self-requested a review April 2, 2020 06:43
- Same task can be attached over and over again, producing multiple terminal widgets. With this change, Theia sets focus to the teminal widget that the to-be-attached task is running from. If such terminal widget is not found, Theia creates a new terminal widget for the attached task.

- fixes #7407

Signed-off-by: Liang Huang <[email protected]>
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.

Code looks good for me after update.

Tested using long-running-task and tsc:watch tasks:

  • run -> attach
  • run -> refresh a page -> attach
  • run -> open another browser tab -> attach -> again attach

It works well for me!
thanks Liang !

@elaihau elaihau merged commit 2c16d4e into master Apr 4, 2020
@elaihau elaihau deleted the Liang/attachTaskNotNewWidget branch April 4, 2020 15:51
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 terminal issues related to the terminal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attaching the same task repeatedly should not open multiple terminals
3 participants