How to use the sprotty.RequestModelAction 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 spring-projects / sts4 / nodejs-packages / sprotty-live-beans-client / src / standalone.ts View on Github external
function requestModelAction() : RequestModelAction {
        return new RequestModelAction({ 'target' : getTarget()});
    }
}
github eclipsesource / graphical-lsp / client / examples / workflow / workflow-standalone / src / main.ts View on Github external
websocket.addEventListener('open', event => {
    actionDispatcher.dispatch(new RequestModelAction({
        sourceUri: `file://${examplePath}`,
        diagramType: "workflow-diagram",
    }));
    actionDispatcher.dispatch(new RequestOperationsAction());
    actionDispatcher.dispatch(new RequestTypeHintsAction("workflow-diagram"));
});
github eclipsesource / graphical-lsp / client / examples / theia-ecore / theia-ecore / src / browser / ecore-diagram-manager..ts View on Github external
protected initializeSprotty() {
        const modelSource = this.diContainer.get(TYPES.ModelSource);
        if (modelSource instanceof DiagramServer)
            modelSource.clientId = this.id;
        if (modelSource instanceof GLSPTheiaDiagramServer && this.connector)
            this.connector.connect(modelSource);
        this.disposed.connect(() => {
            if (modelSource instanceof GLSPTheiaDiagramServer && this.connector)
                this.connector.disconnect(modelSource);
        });
        this.actionDispatcher.dispatch(new RequestModelAction({
            sourceUri: this.options.uri,
            diagramType: this.options.diagramType,
            needsClientLayout: 'true'
        }));

        this.actionDispatcher.dispatch(new RequestOperationsAction());
        this.actionDispatcher.dispatch(new RequestTypeHintsAction());
    }
}