UNPKG

@eclipse-glsp/theia-integration

Version:

Glue code to integrate GLSP clients into Eclipse Theia

35 lines 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /******************************************************************************** * Copyright (c) 2019-2024 EclipseSource and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ const di_1 = require("@eclipse-glsp/protocol/lib/di"); const common_1 = require("@theia/core/lib/common"); const messaging_service_1 = require("@theia/core/lib/node/messaging/messaging-service"); const inversify_1 = require("@theia/core/shared/inversify"); const common_2 = require("../common"); const glsp_backend_contribution_1 = require("./glsp-backend-contribution"); const glsp_node_server_contribution_1 = require("./glsp-node-server-contribution"); const glsp_server_contribution_1 = require("./glsp-server-contribution"); exports.default = new inversify_1.ContainerModule(bind => { (0, di_1.bindAsService)(bind, messaging_service_1.MessagingService.Contribution, glsp_backend_contribution_1.GLSPBackendContribution); bind(common_2.GLSPContribution.Service).toService(glsp_backend_contribution_1.GLSPBackendContribution); (0, common_1.bindContributionProvider)(bind, glsp_server_contribution_1.GLSPServerContribution); bind(common_1.ConnectionHandler) .toDynamicValue(ctx => new common_1.RpcConnectionHandler(common_2.GLSPContribution.servicePath, () => ctx.container.get(common_2.GLSPContribution.Service))) .inSingletonScope(); bind(glsp_node_server_contribution_1.ServerContainerFactory).toFactory(ctx => () => ctx.container.createChild()); }); //# sourceMappingURL=theia-integration-backend-module.js.map