eventbus-intellij-plugin icon indicating copy to clipboard operation
eventbus-intellij-plugin copied to clipboard

Not working with dependency injection

Open siempredelao opened this issue 8 years ago • 0 comments

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?

siempredelao avatar Jul 22 '16 13:07 siempredelao