How to use the sprotty/lib.configureCommand 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 / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);

    configureCommand({ bind, isBound }, SwitchRoutingModeCommand);

    bind(TYPES.IVNodePostprocessor).to(LocationPostprocessor);
    bind(TYPES.HiddenVNodePostprocessor).to(LocationPostprocessor);
});
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
// create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);

    configureCommand({ bind, isBound }, SwitchRoutingModeCommand);

    bind(TYPES.IVNodePostprocessor).to(LocationPostprocessor);
    bind(TYPES.HiddenVNodePostprocessor).to(LocationPostprocessor);
});
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);

    configureCommand({ bind, isBound }, SwitchRoutingModeCommand);

    bind(TYPES.IVNodePostprocessor).to(LocationPostprocessor);
    bind(TYPES.HiddenVNodePostprocessor).to(LocationPostprocessor);
});
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);

    configureCommand({ bind, isBound }, SwitchRoutingModeCommand);
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);

    configureCommand({ bind, isBound }, SwitchRoutingModeCommand);

    bind(TYPES.IVNodePostprocessor).to(LocationPostprocessor);
    bind(TYPES.HiddenVNodePostprocessor).to(LocationPostprocessor);
});
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / base / di.config.ts View on Github external
const defaultGLSPModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
    const context = { bind, _unbind, isBound, rebind };
    // Tool manager initialization ------------------------------------
    configureActionHandler(context, SetOperationsAction.KIND, GLSPToolManagerActionHandler);
    bind(GLSP_TYPES.IToolFactory).toFactory((createToolFactory()));

    // Model update initialization ------------------------------------
    configureCommand(context, FeedbackAwareUpdateModelCommand);
    configureActionHandler(context, SetModelCommand.KIND, SetModelActionHandler);

    rebind(TYPES.ICommandStack).to(GLSPCommandStack);
});
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tool-feedback / di.config.ts View on Github external
const toolFeedbackModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(GLSP_TYPES.IFeedbackActionDispatcher).to(FeedbackActionDispatcher).inSingletonScope();

    // create node and edge tool feedback
    configureCommand({ bind, isBound }, ApplyCursorCSSFeedbackActionCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeCommand);
    configureCommand({ bind, isBound }, RemoveFeedbackEdgeCommand);

    configureView({ bind, isBound }, FeedbackEdgeEnd.TYPE, FeedbackEdgeEndView);
    // move tool feedback: we use sprotties MoveCommand as client-side visual feedback
    configureCommand({ bind, isBound }, MoveCommand);

    // resize tool feedback
    configureCommand({ bind, isBound }, ShowChangeBoundsToolResizeFeedbackCommand);
    configureCommand({ bind, isBound }, HideChangeBoundsToolResizeFeedbackCommand);
    configureView({ bind, isBound }, SResizeHandle.TYPE, SResizeHandleView);

    // reconnect edge tool feedback
    configureCommand({ bind, isBound }, ShowEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, HideEdgeReconnectHandlesFeedbackCommand);
    configureCommand({ bind, isBound }, DrawFeedbackEdgeSourceCommand);
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / hints / di.config.ts View on Github external
const modelHintsModule = new ContainerModule((bind, _unbind, isBound) => {
    bind(TypeHintProvider).toSelf().inSingletonScope();
    bind(GLSP_TYPES.ITypeHintProvider).toService(TypeHintProvider);
    configureActionHandler({ bind, isBound }, SetTypeHintsAction.KIND, TypeHintProvider);
    configureCommand({ bind, isBound }, ApplyTypeHintsCommand);
});
github eclipsesource / graphical-lsp / client / packages / glsp-sprotty / src / features / change-bounds / di.config.ts View on Github external
const changeBoundsCommandModule = new ContainerModule((bind, _unbind, isBound) => {
    configureCommand({ bind, isBound }, SwitchResizeModeCommand)
})