How to use the sprotty/lib.configureModelElement function in sprotty

To help you get started, we’ve selected a few sprotty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
        configureViewerOptions(context, {
            needsClientLayout: true,
            needsServerLayout,
            baseDiv: containerId
        });
    });
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
        configureViewerOptions(context, {
            needsClientLayout: true,
            needsServerLayout,
            baseDiv: containerId
        });
    });
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
        configureViewerOptions(context, {
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
        configureViewerOptions(context, {
            needsClientLayout: true,
            needsServerLayout,
            baseDiv: containerId
        });
    });
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / di.config.ts View on Github external
const classDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
        rebind(TYPES.ILogger).to(ConsoleLogger).inSingletonScope();
        rebind(TYPES.LogLevel).toConstantValue(LogLevel.warn);
        const context = { bind, unbind, isBound, rebind };
        configureModelElement(context, 'graph', EcoreGraph, SGraphView);
        configureModelElement(context, 'node:class', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:enum', ClassNode, ClassNodeView);
        configureModelElement(context, 'node:datatype', ClassNode, ClassNodeView);
        configureModelElement(context, 'label:heading', SLabel, SLabelView);
        configureModelElement(context, 'node:attribute', SNode, RectangularNodeView);
        configureModelElement(context, 'node:enumliteral', SNode, RectangularNodeView);
        configureModelElement(context, 'node:operation', SNode, RectangularNodeView);
        configureModelElement(context, 'label:text', SLabel, SLabelView);
        configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
        configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
        configureModelElement(context, 'icon', Icon, IconView);
        configureModelElement(context, 'label:icon', SLabel, SLabelView);
        configureModelElement(context, 'html', HtmlRoot, HtmlRootView);
        configureModelElement(context, 'pre-rendered', PreRenderedElement, PreRenderedView);
        configureModelElement(context, 'button:expand', SButton, ExpandButtonView);
        configureModelElement(context, 'routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'volatile-routing-point', SRoutingHandle, SRoutingHandleView);
        configureModelElement(context, 'edge:reference', SEdge, PolylineEdgeView);
        configureModelElement(context, 'edge:inheritance', SEdge, InheritanceEdgeView);
        configureModelElement(context, 'edge:aggregation', SEdge, AggregationEdgeView);
        configureModelElement(context, 'edge:composition', SEdge, CompositionEdgeView);
        configureModelElement(context, 'edge', SEdge, ArrowEdgeView);
        configureViewerOptions(context, {
            needsClientLayout: true,
            needsServerLayout,
            baseDiv: containerId
        });