Restarting Theia Programmatically
April 29, 2019 at 12:22pmRestarting Theia Programmatically
April 29, 2019 at 12:22pmI'm trying to implement the VS Code "workbench.action.reloadWindow" command. For example, vscode-java uses it to restart VS Code and thereby itself. I'm a bit confused as to what "restart" would mean for Theia, though. I am thinking that we would have to restart any backend services and in particular all plugins (as they would need to reinitialize). Does anyone have ideas on how to best approach this problem?
April 29, 2019 at 1:15pm
sounds like the same problem that solved when we developed the theia-extension runtime installer. We have a main process that (re)starts a secondary process containing the application. How does VS Code do it?
But I don't see a clear lifecycle in Theia.
What's the theia-extension runtime installer?
Restart the application, not the process, that is.
Anyway, Since our plugin system is open for extension (think running plugins in Che sidecar containers), we'd likely have to introduce some restart logic into a protocol somewhere in order to have a clean restart.
April 30, 2019 at 9:55am
When you reload the page all vs code extensions are reloaded from scratch as well as user session, would not it be enough?
We've removed cluster module recently and i'm not keen on retroducing it. It was causing complexity in electron app with different dev/prod setups and additional indirection.
May 2, 2019 at 8:19am
it could be done without reload i guess, if there is a programmatic way to ask the host process to reload and it ensures that unloaded plugins properly remove all contributions from main process.
I don't see such capabilities in
HostedPluginSupport
, it only can load more plugins, not unload existingWe will need it later if we want to support uninstall plugin UI without page reload as well.
I wonder how multiple windows per a workspace are supporetd in Che if a new host process is not started for each window.
May 3, 2019 at 9:10am
May 13, 2019 at 9:00am