UNPKG

@eclipse-glsp/protocol

Version:

The protocol definition for client-server communication in GLSP

44 lines 1.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditMode = exports.SetEditModeAction = void 0; /******************************************************************************** * Copyright (c) 2020-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 ********************************************************************************/ const type_util_1 = require("../utils/type-util"); const base_protocol_1 = require("./base-protocol"); var SetEditModeAction; (function (SetEditModeAction) { SetEditModeAction.KIND = 'setEditMode'; function is(object) { return base_protocol_1.Action.hasKind(object, SetEditModeAction.KIND) && (0, type_util_1.hasStringProp)(object, 'editMode'); } SetEditModeAction.is = is; function create(editMode) { return { kind: SetEditModeAction.KIND, editMode }; } SetEditModeAction.create = create; })(SetEditModeAction || (exports.SetEditModeAction = SetEditModeAction = {})); /** * The potential default values for the `editMode` property of a {@link SetEditModeAction}. */ var EditMode; (function (EditMode) { EditMode.READONLY = 'readonly'; EditMode.EDITABLE = 'editable'; })(EditMode || (exports.EditMode = EditMode = {})); //# sourceMappingURL=model-edit-mode.js.map