@eclipse-glsp/protocol
Version:
The protocol definition for client-server communication in GLSP
38 lines • 2.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonrpcGLSPClient = void 0;
/********************************************************************************
* Copyright (c) 2020-2026 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 vscode_jsonrpc_1 = require("vscode-jsonrpc");
const glsp_client_1 = require("../glsp-client");
var JsonrpcGLSPClient;
(function (JsonrpcGLSPClient) {
function isOptions(object) {
return glsp_client_1.GLSPClient.isOptions(object) && 'connectionProvider' in object;
}
JsonrpcGLSPClient.isOptions = isOptions;
JsonrpcGLSPClient.ActionMessageNotification = new vscode_jsonrpc_1.NotificationType('process');
JsonrpcGLSPClient.InitializeRequest = new vscode_jsonrpc_1.RequestType('initialize');
JsonrpcGLSPClient.InitializeClientSessionRequest = new vscode_jsonrpc_1.RequestType('initializeClientSession');
JsonrpcGLSPClient.DisposeClientSessionRequest = new vscode_jsonrpc_1.RequestType('disposeClientSession');
JsonrpcGLSPClient.ShutdownNotification = new vscode_jsonrpc_1.NotificationType0('shutdown');
JsonrpcGLSPClient.ClientNotReadyMsg = 'JsonrpcGLSPClient is not ready yet';
function error(message, ...optionalParams) {
console.error(`[JsonrpcGLSPClient] ${message}`, optionalParams);
}
JsonrpcGLSPClient.error = error;
})(JsonrpcGLSPClient || (exports.JsonrpcGLSPClient = JsonrpcGLSPClient = {}));
//# sourceMappingURL=glsp-jsonrpc-client.js.map