Enhancement suggestion: "Eclipse 4 event system (EventAdmin) - Tutorial"

316 views
Skip to first unread message

Daniel Zimmermann

unread,
Sep 10, 2013, 3:39:45 AM9/10/13
to vog...@googlegroups.com

Hi,


last week I've tried to make use of the IEventBroker by

a) following advices I'd received from Tom Schindl (the app I'm trying to implement is on top of e(fx)clipse) and

b) those of your tutorial.

Unfortunatelly I was not able to use it at all. Only some tipps from Tom made it work finally.

The problem is, that I don't use the e4 UI components, but only plain OSGi bundles with an application bundle from Tom. To make use of the IEventBroker you need to add the following bundles (even if they suggest to pull even more e4 based dependencies, I wouldn't need):

org.eclipse.e4.core.contexts

org.eclipse.e4.ui.services

org.eclipse.e4.ui.di

e4.ui.services seems to be the source of the an IContextFunction Tom mentioned at some time.


My suggestion is: Please include those bundles in your tutorial for applications that are not directly based on e4. Tom, on the other hand, might file a bug for moving these functions in a more appropriate bundle.


Greetings,

Daniel


PS: Sorry for sending this to the support mail before reading the FAQ... Won't happen again.

Lars Vogel

unread,
Sep 10, 2013, 4:18:52 AM9/10/13
to zim.d...@gmail.com, vog...@googlegroups.com
Hi,

I think you are looking for this blog entry.


Best regards, Lars

2013/9/10 Daniel Zimmermann <zim.d...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "vogella" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vogella+u...@googlegroups.com.
To post to this group, send email to vog...@googlegroups.com.
Visit this group at http://groups.google.com/group/vogella.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Zimmermann

unread,
Sep 10, 2013, 4:31:52 AM9/10/13
to vog...@googlegroups.com, zim.d...@gmail.com
Hi Lars,

the difference is: I want to make full use of the DI system of Eclipse. I don't want to take care and query the bundle context for services.
With the System I've implemented, I can now do the same as you described it in your tutorial. Inejct the IEventBroker, inject a event handler method and no need to take care of service references.

There is only one difference to your tutorial. I need to implement the handler methods a bit different

@Inject handleSomething(@Optional @EventTopic("foo") Object bar) {...}
instead of 
@Inject @Optional handleSomething(@UIEventTopic("foo") Object bar) {...}

Daniel
Reply all
Reply to author
Forward
0 new messages