menu
announcement

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

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

How to launch a theia extension command

February 5, 2020 at 7:55am

How to launch a theia extension command

February 5, 2020 at 7:55am
If we follow the basic hello world extension, notification is shown on user action (menu action). How to trigger a command onLoad or onUnload of theia frontend (editor)
Usecase:
  • Display a welcome / landing page display on first load
  • When user switches tab start a countdown to limit/scale down server to save cost

February 6, 2020 at 6:17am
i.e. async configure hook can block the shell loading
and then there is onWillStop and onStop
you cannot do any async code on stop even, it will be ignored by a browser
so fo the second case i guess you will need some kind of ping from the frontend
Maybe beaconAPI would be helpful for the onWillStop and onStop events else PING-PONG mechanism works as well