menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

Save workspace settings

September 7, 2019 at 8:56am

Save workspace settings

September 7, 2019 at 8:56am
Currently when I define a workspace (theme preference, files loaded, widget/window positions) it is saved in the browsers local file storage. I would like to save these settings and automatically load the workspace settings when opening the workspace path in the browser. However, currently "Save workspace as" is disabled in the file menu. Is there a way to enable this menu item or to force a save in another manner?

September 7, 2019 at 11:31am
I managed to find the setting to enable multi-root workspaces but it just saves a file without values:
{
"folders": [
{
"path": ""
}
],
"settings": {}
}
Edited

September 9, 2019 at 4:47am
It works like designed to be compatible with VS Code. If you want to store window state as a part of a workspace settings, you will need to create a custom extension with custom WorkspaceStorage which persist/retrive such information in the file not in the local storae.
Thank you very much . Do you know of any examples where this is done already. If not I'll give it a shot from scratch.
Just closing the loop here if someone is looking for the same thing: https://github.com/theia-ide/theia/issues/4263#issuecomment-529342132
I am not aware of any open source code. Gitpod workspace snapshots are capable to capture and restore such information, so it was done, but this code is not opened.