-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add 'tasks.onDidStartTask' for Plug-in API #3826
Conversation
fe35cdf
to
bd2f90d
Compare
this.taskWatcher = container.get(TaskWatcher); | ||
this.taskService = container.get(TaskService); | ||
|
||
this.workspaceService.roots.then(async roots => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello, where is async part in this method ? (as there is async keyword)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benoitf fixed, thank you!
} from '../../api/plugin-api'; | ||
import * as theia from '@theia/plugin'; | ||
import * as Converter from '../type-converters'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say to use lowercase there
import * as converter from ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benoitf fixed
@@ -233,4 +233,16 @@ export class TaskService implements TaskConfigurationClient { | |||
protected getContext(): string | undefined { | |||
return this.workspaceRootUri; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simark @akosyakov notifying you as there are changes not only in plugin-ext packages but also in packages/task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok with me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the task
part. One little comment about the ChangeLog.
CHANGELOG.md
Outdated
@@ -6,6 +6,7 @@ | |||
- [core] Add a way to prevent application exit from extensions. | |||
- [core] Prevent application exit if some editors are dirty. | |||
- [languages] Add a preference for every language contribution to be able to trace the communication client <-> server | |||
- [plug-in] added `tasks.onDidStartTask` Plug-in API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added -> Add (capital letter and present tense)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simark fixed, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simark I fixed your comment and updated (rebased) my branch, can I merge it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Based on #3897, it seems like you may have to go back to what you had originally :). We'll see what we decide in the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simark I changed to original condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simark could you review - can I merge my PR?
0ecf27f
to
4c7efa6
Compare
That's fine with me. Just wondering, are there some tests that ensure the plugin API (typing and behavior) doesn't change? And just a note, the behavior of the "shell" task is going to change soon-ish (I've been slowly working on that for a while). Those tasks are supposed to be executed through a shell, so that you can do things like |
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
4c7efa6
to
81d4712
Compare
I added in current PR ability to track on the plugin side case when a task has started. I added also a couple of tests to be sure we correctly convert task.
Cool! |
Add:
Example:
Video: https://youtu.be/AMfN-Pdiww0
Signed-off-by: Roman Nikitenko rnikiten@redhat.com