-
Hi, I have two theia extensions and I want one of them provide something similar to an extensions point as explained here: https://eclipsesource.com/blogs/2018/11/28/how-to-inversify-in-eclipse-theia/ The first extension is a resource viewer the the second is an editor, I want that when a resource is clicked the editor is notified. I've tried to implement a resource listener in the viewer like this
And then bind it in the frontend module Now on the editor extension I try to get this dependency with
But when I open the editor extension I got this error: Uncaught (in promise) Error: No matching bindings found for serviceIdentifier: Symbol(IResourceListenerManager) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Watch out! Symbol('foo') === Symbol('foo') // false Check the docs here I am not sure if you have copied the code as is or it's just a pseudo one but try the injections like this: import { IResourceListenerManager } from './path/to/the/module';
// ...
// this could be the problem in your code -> @inject(Symbol('IResourceListenerManager')) private readonly resourceListener: any
@inject(IResourceListenerManager) private readonly resourceListener: IResourceListenerManager
@inject(MessageService) private readonly messageService: MessageService Update: l have checked the |
Beta Was this translation helpful? Give feedback.
-
Thanks @kittaakos , your suggestion was right, registering only the string instead that the symbol allow me to solve the problem between add a dependence between the two extension. I'll leave the code here for anyone that has the same problem: provider
Provider frontend module
Consumer
|
Beta Was this translation helpful? Give feedback.
Thanks @kittaakos , your suggestion was right, registering only the string instead that the symbol allow me to solve the problem between add a dependence between the two extension. I'll leave the code here for anyone that has the same problem:
provider