UNPKG

@eclipse-glsp/protocol

Version:

The protocol definition for client-server communication in GLSP

53 lines 2.5 kB
"use strict"; /******************************************************************************** * Copyright (c) 2021-2023 STMicroelectronics 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.TriggerEdgeCreationAction = exports.TriggerNodeCreationAction = void 0; const type_util_1 = require("../utils/type-util"); const base_protocol_1 = require("./base-protocol"); var TriggerNodeCreationAction; (function (TriggerNodeCreationAction) { TriggerNodeCreationAction.KIND = 'triggerNodeCreation'; function is(object) { return base_protocol_1.Action.hasKind(object, TriggerNodeCreationAction.KIND) && (0, type_util_1.hasStringProp)(object, 'elementTypeId'); } TriggerNodeCreationAction.is = is; function create(elementTypeId, options) { return { kind: TriggerNodeCreationAction.KIND, elementTypeId, ...options }; } TriggerNodeCreationAction.create = create; })(TriggerNodeCreationAction || (exports.TriggerNodeCreationAction = TriggerNodeCreationAction = {})); var TriggerEdgeCreationAction; (function (TriggerEdgeCreationAction) { TriggerEdgeCreationAction.KIND = 'triggerEdgeCreation'; function is(object) { return base_protocol_1.Action.hasKind(object, TriggerEdgeCreationAction.KIND) && (0, type_util_1.hasStringProp)(object, 'elementTypeId'); } TriggerEdgeCreationAction.is = is; function create(elementTypeId, options = {}) { return { kind: TriggerEdgeCreationAction.KIND, elementTypeId, ...options }; } TriggerEdgeCreationAction.create = create; })(TriggerEdgeCreationAction || (exports.TriggerEdgeCreationAction = TriggerEdgeCreationAction = {})); //# sourceMappingURL=tool-palette.js.map