I am trying to make a plugin (not extension) command available depending on the file selected, so I intended to use UriAwareCommandHandler. But I don’t seem capable of getting an instance of the SelectionService in the plugin context (i.e. not injecting).
Can anyone help?
@davidg.kairos thank you for the discussion, I do not believe it is possible to use
UriAwareCommandHandler outside of theia extensions.
Really? So there is no way for plugins to contribute selection-dependent commands?
@davidg.kairos it depends on what you need, for instance, if your selection is based on an active editor, or active editor selection (text) then it is possible. If you selection is based on what is selected in the explorer (but not opened) I don’t believe the plugin-system exposes such explorer selections, nor does it in vscode.
Ok, thanks @vince-fugnitto