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

[multi-root] workspace roots not refreshed properly when removed #6010

Closed
vince-fugnitto opened this issue Aug 21, 2019 · 0 comments · Fixed by #5953
Closed

[multi-root] workspace roots not refreshed properly when removed #6010

vince-fugnitto opened this issue Aug 21, 2019 · 0 comments · Fixed by #5953
Labels
bug bugs found in the application multi-root issues related to multi-root support

Comments

@vince-fugnitto
Copy link
Member

Description

If a multi-root workspace's roots are removed, the roots are not properly refreshed.
For instance, with no roots present, one can still execute commands based on the last available root.

Steps to Reproduce

  • open a workspace (ex: theia/packages/core)
  • ensure that the preference workspace.supportMultiRootWorkspace is enabled
  • add a new root using the command Add Folder to Workspace (select theia/packages/bunyan)
  • remove both roots by right clicking the root nodes in the tree and selecting Remove Folder from Workspace
  • you should be left with a workspace without any available roots
  • execute the command File: New File, a dialog appears with a file name and upon confirmation the file is added to the last available root

In my example, I create the file vincent.ts despite no workspace roots being available, and it still gets created at the last available root.

Screen Shot 2019-08-21 at 11 37 10 AM
@vince-fugnitto vince-fugnitto added bug bugs found in the application multi-root issues related to multi-root support labels Aug 21, 2019
vince-fugnitto added a commit that referenced this issue Aug 21, 2019
Fixes #5951
Fixes #6010

- added a toolbar item which contains multiple commands for the explorer.
- adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands
which deal with single and multi-root workspaces.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 21, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of mutliple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

- added a toolbar item which contains multiple commands for the explorer.
- adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands
which deal with single and multi-root workspaces.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 21, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of mutliple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 21, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 23, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 23, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 23, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 23, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 26, 2019
Fixes #5951
Fixes #6010

- Added a new toolbar item for the `explorer` which consists of multiple commands.
- Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which
can be used by the workspace root in both a single and multi-root workspace.
- Added the command `New File` to the toolbar item.
- Added the command `New Folder` to the toolbar item.
- Added the command `Add Folder to Workspace...` to the toolbar item.
- Added the command `Compare With...` to the toolbar item.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application multi-root issues related to multi-root support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant