I added a window listener event to the extension front end. How do I run a command immediately when I start theia
Hi @kingkiller, you can create a custom implementation of a FrontendApplicationContribution
and implement its initializeLayout
method. In there, you should be able to inject the CommandRegistry
, which contains the executeCommand
method, which you can invoke to run your command.
You need to bind your FrontendApplicationContribution
in your frontend module like this:
bind(CustomFrontendApplicationContribution).toSelf().inSingletonscope();
bind(FrontendApplicationContribution).toService(CustomFrontendApplicationContribution);
Thank you. This can be done