-
Notifications
You must be signed in to change notification settings - Fork 111
Export configurations of Che tasks to config file #355
Conversation
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
private getRootPath(): string { | ||
const workspaceFolders = theia.workspace.workspaceFolders; | ||
if (!workspaceFolders || workspaceFolders.length < 1) { | ||
return ''; |
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 am wondering if we need to return /projects
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 think it makes sense, thank you!
Done!
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.
It's really confusable for me that we have a case when there is no opened workspace
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 prefer to stop command execution in that case at all.
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'm sorry - you wrote the comment in 4 minutes after the PR merging.
We can consider your issue eclipse-che/che#13909 or improve the current behaviour in this place in another PR.
WDYT?
I've checked the provided image and can't reproduce the issue eclipse-che/che#13799 |
FYI build is failing |
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.
Works fine!
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
@benoitf thank you all for testing and review! |
What does this PR do?
Export configurations of
Che
tasks to config filecommands
section ofdevfile
can contain actions withche
commands, for example:The PR allows to convert them to theia tasks format and copy to config file of current workspace folder. After that they are available for running from UI:
Terminal
=>Run Task
menu or usingMy Workspace
panel. So now we considertasks.json
file as one source where user can find allche
tasks, edit them or add a new task.The current implementation allows to merge existed configurations from config file and configs from devfile. So user can add new configurations to config file or edit existed ones - the changes are stored to config file.
How to test
Use the component in your devfile
The image contains:
You can use
commands
section above as example to provide some tasks in your config file.Please, try to run
che
commands usingTerminal
=>Run Task
menu andMy Workspace
panel as wellWhat issues does this PR fix or reference?
eclipse-che/che#13392
https://github.com/eclipse/che-theia/issues/248
fixes for
Che
commands the issue: Can not run Configured task eclipse-theia/theia#5064We provided
che
commands as detectedtheia
tasks. The issue was caused by changes in theia project (the description contains reference to the code) and was reproduced at moving a task fromdetected
toconfigured
section. The issue is not relevant as nowche
tasks are citizens oftasks.json
file and available for editing without moving fromdetected
toconfigured
section.fixes for
Che
commands the issue: Recently used tasks section should respect configured tasks eclipse-theia/theia#5067The issue was manifested when user run a task after configuring from
recently
used section. The original configuration was run, not overrided. It’s not relevant anymore -che
tasks have only one source now -tasks.json
file.fixes for
Che
commands the issue: Contributed Task Configuration question eclipse-theia/theia#4928The issue was relevant for
detected
tasks, according to the changes of this PR we considerche
commands as configuredtheia
tasks, so it’s not relevant forche
commands anymore.Signed-off-by: Roman Nikitenko rnikiten@redhat.com