How to use the @theia/languages/lib/common.LanguageContribution.getPath function in @theia/languages

To help you get started, we’ve selected a few @theia/languages examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / graphical-lsp / client / packages / theia-integration / src / browser / language / glsp-client-contribution.ts View on Github external
protected async doActivate(toDeactivate: DisposableCollection): Promise {
        const options: WebSocketOptions = {};
        toDeactivate.push(Disposable.create(() => options.reconnecting = false));
        this.connectionProvider.listen({
            path: LanguageContribution.getPath(this),
            onConnection: messageConnection => {
                if (toDeactivate.disposed) {
                    messageConnection.dispose();
                    return;
                }
                const languageClient = this.createLanguageClient(messageConnection);
                this.onWillStart(languageClient);
                toDeactivate.pushAll([
                    messageConnection,
                    this.toRestart.push(Disposable.create(async () => {
                        await languageClient.onReady();
                        languageClient.stop();
                    })),
                    languageClient.start()
                ]);
            }