sprotty
sprotty copied to clipboard
Improve extensibility of multi-injected keys
Double check the codebase and ensure that all all multi-injected classes are bound to self() in Singleton scope before binding them to the multi injection key. This makes it possible to overwrite them. e.g
bind(MoveMouseListener).toSelf().inSingletonScope();
bind(TYPES.MouseListener).toService(MoveMouseListener);
instead of
bind(TYPES.MouseListener).to(MoveMouseListener);
See also discussion in https://github.com/eclipse/sprotty/pull/234#issuecomment-897606251