UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

61 lines 4.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.baseViewModule = void 0; exports.configureDefaultModelElements = configureDefaultModelElements; /******************************************************************************** * Copyright (c) 2021-2025 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 sprotty_1 = require("@eclipse-glsp/sprotty"); const issue_marker_1 = require("../features/validation/issue-marker"); const model_1 = require("../model"); const gedge_view_1 = require("./gedge-view"); const ggraph_view_1 = require("./ggraph-view"); const issue_marker_view_1 = require("./issue-marker-view"); const rounded_corner_view_1 = require("./rounded-corner-view"); const routing_point_handle_view_1 = require("./routing-point-handle-view"); exports.baseViewModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => { const context = { bind, unbind, isBound, rebind }; configureDefaultModelElements(context); }, { featureId: Symbol('baseView') }); function configureDefaultModelElements(context) { // HTML elements (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.HTML, sprotty_1.GHtmlRoot, sprotty_1.HtmlRootView); // generic elements (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.FOREIGN_OBJECT, sprotty_1.GForeignObjectElement, sprotty_1.ForeignObjectView, { disable: [sprotty_1.selectFeature, sprotty_1.moveFeature] }); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.PRE_RENDERED, sprotty_1.GPreRenderedElement, sprotty_1.PreRenderedView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.SHAPE_PRE_RENDERED, sprotty_1.GShapedPreRenderedElement, sprotty_1.PreRenderedView); // SVG elements (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.SVG, sprotty_1.GViewportRootElement, sprotty_1.SvgViewportView); // graph elements (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.GRAPH, model_1.GGraph, ggraph_view_1.GGraphView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.NODE, sprotty_1.GNode, rounded_corner_view_1.RoundedCornerNodeView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.COMPARTMENT, sprotty_1.GCompartment, sprotty_1.GCompartmentView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.COMPARTMENT_HEADER, sprotty_1.GCompartment, sprotty_1.GCompartmentView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.EDGE, model_1.GEdge, gedge_view_1.GEdgeView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.PORT, sprotty_1.GPort, sprotty_1.RectangularNodeView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.ROUTING_POINT, sprotty_1.GRoutingHandle, routing_point_handle_view_1.GRoutingHandleView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.VOLATILE_ROUTING_POINT, sprotty_1.GRoutingHandle, routing_point_handle_view_1.GRoutingHandleView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.LABEL, sprotty_1.GLabel, sprotty_1.GLabelView); // UI elements (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.BUTTON_EXPAND, sprotty_1.GButton, sprotty_1.ExpandButtonView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.ISSUE_MARKER, issue_marker_1.GIssueMarker, issue_marker_view_1.GIssueMarkerView); // shapes (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.NODE_CIRCLE, sprotty_1.CircularNode, sprotty_1.CircularNodeView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.NODE_DIAMOND, sprotty_1.DiamondNode, sprotty_1.DiamondNodeView); (0, sprotty_1.configureModelElement)(context, sprotty_1.DefaultTypes.NODE_RECTANGLE, sprotty_1.RectangularNode, sprotty_1.RectangularNodeView); } //# sourceMappingURL=base-view-module.js.map