sprotty icon indicating copy to clipboard operation
sprotty copied to clipboard

Improve extensibility of multi-injected keys

Open tortmayr opened this issue 4 years ago • 0 comments

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

tortmayr avatar Sep 01 '21 08:09 tortmayr