Extension: Removing/reordering Launcher categories

If you implement ILauncher (exactly one method, add), and return an instance of that from your plugin’s activate function, your extension will receive all of the calls that would have gone to the core implementation. I actually don’t have a concrete example of doing so, but you kinda just start solving the typescript puzzle (either in an editor that supports typescript, or with the tsc -w running).

A few singletons (e.g. the app’s CommandRegistry and ServiceManager) don’t work this way, but pretty much everything else does.

The term of art here is dependency injection. Other frameworks like AngularJS or Sprotty take this maybe a little too far, but have their reasons for doing so (fully integrated test tools, parity with Java tooling, etc). I personally find the Lumino level pretty useful for organizing applications without making piles of ImplementationFactoryActualizationMethodCallers (though to be fair, ABCWidgetFactory you have to build for Documents basically sounds just as made up until you dig into it).

1 Like