eventbus-intellij-plugin
eventbus-intellij-plugin copied to clipboard
Not working with dependency injection
I have created a IBus abstraction and implemented it with EventBus.
public interface IBus {
void register(Object object);
void unregister(Object object);
void post(Object object);
}
public class Bus implements IBus {
private final EventBus eventBus;
public Bus(final EventBus eventBus) {
this.eventBus = eventBus;
}
@Override
public void register(final Object object) {
eventBus.register(object);
}
@Override
public void unregister(final Object object) {
eventBus.unregister(object);
}
@Override
public void post(final Object object) {
eventBus.post(object);
}
}
Now, when I inject the IBus via:
@Inject
IBus bus;
, it doesn't recognize IBus as EventBus (onEvent methods are recognized but they don't find any occurrence). Is there any way to workaround this?