Any way to implement Hot Exit in Theia?

Hi All,

Wanted to implement something like VS Code Hot Exit in theia where even after closing your IDE and opening it back up again the modifications made by the user would still be shown but wouldn’t have been saved (see for more details)

I am looking to implement something like this for my custom widgets where for a particular widget if I open my old workspace I can see all the modifications that I had previously made without essentially saving.

Thanks & Regards :slight_smile:

Hi @vatsal.uppal

You can implement something similar for your custom widgets using the StatefulWidget interface. The shell layout restorer will always store (on exit) and restore the content (on startup) if the interface is correctly implemented.

Hi @msujew,

Thanks for your answer! While this is what I am looking for, is there a way perhaps to not store the data in the browser’s local storage but rather persist it over a particular workspace?

I know of the preference API but the data I want to store is specific to the extension and not a preference per say (i.e don’t want the user to modify it by opening my extensions preferences).

@vatsal.uppal Sorry for the late answer, didn’t see your additional question earlier.

I mean, you could always store your unsaved data into a temporary file in your workspace, but you will have to write that handling yourself. There isn’t a built-in functionality for this, and I don’t think there ever will be. What we’re sometimes discussing is storing unsaved editor data in the local storage like vscode does, but so far there was no action on that yet.