@eclipse-glsp/graph
Version:
The typescript implementation of the GLSP graphical model (GModel)
51 lines • 2.93 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDefaultMapping = getDefaultMapping;
/********************************************************************************
* Copyright (c) 2022-2024 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
********************************************************************************/
const protocol_1 = require("@eclipse-glsp/protocol");
const gbutton_1 = require("./gbutton");
const gcompartment_1 = require("./gcompartment");
const gedge_1 = require("./gedge");
const gforeign_object_element_1 = require("./gforeign-object-element");
const ggraph_1 = require("./ggraph");
const ghtml_root_1 = require("./ghtml-root");
const gissue_marker_1 = require("./gissue-marker");
const glabel_1 = require("./glabel");
const gnode_1 = require("./gnode");
const gport_1 = require("./gport");
const gpre_rendered_element_1 = require("./gpre-rendered-element");
const gshaped_prerendered_element_1 = require("./gshaped-prerendered-element");
function getDefaultMapping() {
// The GModelSerializer (packages/server-node/src/features/model/gmodel-serializer.ts)
// has a built-in subtype handling.
// If the mapping for a subtype, e.g. for comp:header, is not found it will use the mapping for comp instead.
const mapping = new Map();
mapping.set(protocol_1.DefaultTypes.GRAPH, ggraph_1.GGraph);
mapping.set(protocol_1.DefaultTypes.NODE, gnode_1.GNode);
mapping.set(protocol_1.DefaultTypes.EDGE, gedge_1.GEdge);
mapping.set(protocol_1.DefaultTypes.PORT, gport_1.GPort);
mapping.set(protocol_1.DefaultTypes.LABEL, glabel_1.GLabel);
mapping.set(protocol_1.DefaultTypes.COMPARTMENT, gcompartment_1.GCompartment);
mapping.set(protocol_1.DefaultTypes.BUTTON, gbutton_1.GButton);
mapping.set(protocol_1.DefaultTypes.ISSUE_MARKER, gissue_marker_1.GIssueMarker);
mapping.set(protocol_1.DefaultTypes.HTML, ghtml_root_1.GHtmlRoot);
mapping.set(protocol_1.DefaultTypes.PRE_RENDERED, gpre_rendered_element_1.GPreRenderedElement);
mapping.set(protocol_1.DefaultTypes.SHAPE_PRE_RENDERED, gshaped_prerendered_element_1.GShapedPreRenderedElement);
mapping.set(protocol_1.DefaultTypes.FOREIGN_OBJECT, gforeign_object_element_1.GForeignObjectElement);
return mapping;
}
//# sourceMappingURL=default-types.js.map