Skip to content

Commit

Permalink
Adjust binding for CommandActionHandlerInitializer (#473)
Browse files Browse the repository at this point in the history
Make is easier to customize/rebind the
`CommmandActionHandlerInitializer` by binding to itself before binding
it as IActionHandlerInitializer.

(All other multiinjected keys already follow this pattern. See
#239)
  • Loading branch information
tortmayr authored Nov 21, 2024
1 parent 86cc8a6 commit f82baae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sprotty/src/base/di.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const defaultContainerModule = new ContainerModule((bind, _unbind, isBound) => {
bind(TYPES.IDiagramLocker).to(DefaultDiagramLocker).inSingletonScope();

// Action handler
bind(TYPES.IActionHandlerInitializer).to(CommandActionHandlerInitializer);
bind(CommandActionHandlerInitializer).toSelf().inSingletonScope();
bind(TYPES.IActionHandlerInitializer).toService(CommandActionHandlerInitializer);

// Command Stack ---------------------------------------------
bind(TYPES.ICommandStack).to(CommandStack).inSingletonScope();
Expand Down

0 comments on commit f82baae

Please sign in to comment.