Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
});
// 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);
});
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);
});
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);
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);
});
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);
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);
});
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);
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);
});
const changeBoundsCommandModule = new ContainerModule((bind, _unbind, isBound) => {
configureCommand({ bind, isBound }, SwitchResizeModeCommand)
})