UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

40 lines 1.88 kB
"use strict"; /******************************************************************************** * Copyright (c) 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 ********************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.InsertIndicator = exports.ARG_LENGTH = void 0; const sprotty_1 = require("@eclipse-glsp/sprotty"); const uuid_1 = require("uuid"); const args_feature_1 = require("../../../base/args-feature"); exports.ARG_LENGTH = 'length'; class InsertIndicator extends sprotty_1.GNode { constructor(length) { super(); this.id = (0, uuid_1.v4)(); this.type = InsertIndicator.TYPE; this.features = (0, sprotty_1.createFeatureSet)(InsertIndicator.DEFAULT_FEATURES); this.cssClasses = ['insert-indicator', 'sprotty-node']; this.size = sprotty_1.Dimension.ZERO; this.args = {}; if (length) { this.args = { [exports.ARG_LENGTH]: length }; } } } exports.InsertIndicator = InsertIndicator; InsertIndicator.DEFAULT_FEATURES = [sprotty_1.boundsFeature, sprotty_1.moveFeature, args_feature_1.argsFeature]; InsertIndicator.TYPE = 'node:insert-indicator'; //# sourceMappingURL=insert-indicator.js.map