Closing open workspace & foldersMay 29, 2020 at 2:39pm (Edited 2 years ago)
It seems like calling WorkspaceService.close() causes browser window to refresh & reload (calls reloadWindow()). Is there a way I can close the workspaces or folders without reloading the window? (i.e., the File navigator should become empty)
Will removeRoots() or spliceRoots() work ? Could you please provide examples?
Thanks in advance.
May 29, 2020 at 3:01pm
June 1, 2020 at 5:02am
June 1, 2020 at 12:06pm
the framework uses the
reload()as a way to properly set the state, initialize components correctly, and also restart plugins and language-servers. If your use-case requires removing the
reloadit will require additional implementation effort to also ensure the framework falls on it's feet.
June 5, 2020 at 11:23am
you can try by making changes directly to the sources, or if you'd prefer you should be able to rebind the
close workspacecommand to instead handle it differently (without the reload). I believe that you should not only close the workspace, but also make sure as to clear the widget itself as well (blank state).