UNPKG

@eclipse-glsp/protocol

Version:

The protocol definition for client-server communication in GLSP

57 lines 2.69 kB
"use strict"; /******************************************************************************** * Copyright (c) 2021-2023 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 ********************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.ChangeRoutingPointsOperation = exports.ReconnectEdgeOperation = void 0; const type_util_1 = require("../utils/type-util"); const base_protocol_1 = require("./base-protocol"); var ReconnectEdgeOperation; (function (ReconnectEdgeOperation) { ReconnectEdgeOperation.KIND = 'reconnectEdge'; function is(object) { return (base_protocol_1.Operation.hasKind(object, ReconnectEdgeOperation.KIND) && (0, type_util_1.hasStringProp)(object, 'edgeElementId') && (0, type_util_1.hasStringProp)(object, 'sourceElementId') && (0, type_util_1.hasStringProp)(object, 'targetElementId')); } ReconnectEdgeOperation.is = is; function create(options) { return { kind: ReconnectEdgeOperation.KIND, isOperation: true, ...options }; } ReconnectEdgeOperation.create = create; })(ReconnectEdgeOperation || (exports.ReconnectEdgeOperation = ReconnectEdgeOperation = {})); var ChangeRoutingPointsOperation; (function (ChangeRoutingPointsOperation) { ChangeRoutingPointsOperation.KIND = 'changeRoutingPoints'; function is(object) { return base_protocol_1.Operation.hasKind(object, ChangeRoutingPointsOperation.KIND) && (0, type_util_1.hasArrayProp)(object, 'newRoutingPoints'); } ChangeRoutingPointsOperation.is = is; function create(newRoutingPoints, options = {}) { return { kind: ChangeRoutingPointsOperation.KIND, isOperation: true, newRoutingPoints, ...options }; } ChangeRoutingPointsOperation.create = create; })(ChangeRoutingPointsOperation || (exports.ChangeRoutingPointsOperation = ChangeRoutingPointsOperation = {})); //# sourceMappingURL=edge-modification.js.map