I have a question about WebSocketConnectionProvider, please help me

as below,why use the WebSocketConnectionProvider to proxy?only use bind(CommandRegistry).toSelf().inSingletonScope() that can also call the method of CommandRegistry

bind(CommandRegistry).toSelf().inSingletonScope().onActivation(({ container }, registry) => {
        WebSocketConnectionProvider.createProxy(container, commandServicePath, registry);
        return registry;

[original thread by oyo]

It exposes CommandRegistry as remote proxy object for the backend, so on the backend one can inject CommandService and execute commands


@anton-kosyakov thx,but how to achieve theia’s layout?just css or any Front-end development framework?

sorry, i cannot follow. What do you mean by achieve theia’s layout? and how it is related to exposing CommanRegistry to the backend?


@anton-kosyakov I mean the way that you achieve page layout of theia


and if I want to develop a language server about verilog, what should i do?

Have you tried to run https://marketplace.visualstudio.com/items?itemName=mshr-h.VerilogHDL in Theia?

Alternatively you can build a VS Code extensions with LSP and run it in Theia too: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide


@anton-kosyakov okay, thx, but what’s the way that you achieve page layout of theia?

Please elaborate on achieve? Do you mean have the custom page layout? You should implement FrontendAppliactionContribution.initializeLayout. It’s called each time when there is no previously stored layout and you can use it to hide/open some widgets, reveal something in opened widgets and so on. https://github.com/eclipse-theia/theia/blob/5ea335c560573de3d176c64e37fa18b477434d81/packages/core/src/browser/frontend-application.ts#L66-L70


@anton-kosyakov only use css or other Front-end development framework like antd? because i don’t know how to change layout of theia

@oyosc Maybe we do it another way. Could you tell me concrete what you want to achieve, i.e. I want to have README file opened by default if it is repository or I don’t want to have the bottom panel at all.

You can use antd but only to create a custom widget, to customize shell layout you have to provide a custom extension and use Theia APIs.