-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add ability to defined any subfolders of a git project as workspace roots. #15347
Copy link
Copy link
Closed
Labels
area/editor/theiaIssues related to the che-theia IDE of CheIssues related to the che-theia IDE of Chekind/enhancementA feature request - must adhere to the feature request template.A feature request - must adhere to the feature request template.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.severity/P1Has a major impact to usage or development of the system.Has a major impact to usage or development of the system.
Metadata
Metadata
Assignees
Labels
area/editor/theiaIssues related to the che-theia IDE of CheIssues related to the che-theia IDE of Chekind/enhancementA feature request - must adhere to the feature request template.A feature request - must adhere to the feature request template.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.severity/P1Has a major impact to usage or development of the system.Has a major impact to usage or development of the system.
Is your enhancement related to a problem? Please describe.
By default, che workspaces have only 1 workspace root:
/projectsbut Theia could accept multiple roots.Edit: with #17212 each git-repo/project is turned into a workspace root. So what is missing is to have a way to define 1+ subfolders of a git repo as workspace root.
A workspace root is the top folders that the user would see in the explorer. Each folder is a kind of view of a folder in the file system. See https://code.visualstudio.com/docs/editor/multi-root-workspaces (quite same behaviour in VSCode)
Some extensions are relying on workspace roots to work well.
For instance, with the vscode openshift connector extension, having multiple components in a same workspace is requiring that each component source code folder to be a workspace root.
So the user would have to set a workspace root with the command
Add folder to workspacefor each component. there are some problems:Describe the solution you'd like
Each projects defined in a workspace, would possibly have a list of folder that would be workspace roots of the Che workspace.
/projectsis the default one.would add the 3 folders
/projects/nodejs-ex,/projects/che-quarkus-demo/quarkus-backend,/projects/che-quarkus-demo/node-frontendas workspace root.Of course if the user is using the command
Add folder to workspace, the devfile of the workspace would need to be updated./projects/nodejs-ex-sunixis not added as a workspace root because of it hasrootsarray empty./projects/nodejs-exis added as a workspace root because it is the default behaviour if norootselement is defined.Alternative solution
By default, set each repo of the defile as workspace root. But we would still want to support workspace root on a sub folder of a git repo.
Additional context
This is one solution to fix #15273