Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Using UIEventTopic with custom event property key

... naturally I assume you are in control of the sending bundle. If not
instead of using UIEventTopic you can use the EventBroker directly.

You can of course also file a bugzilla so that we can take an indepth
look whether one could e.g. add a key-property to UIEventTopic.

Tom

Am 07.07.11 17:13, schrieb Tom Schindl:
> The String key found in there can be considered API IMHO so if you
> simply use the correct string key all should be fine and you don't need
> to have a dependency.
> 
> Beside that I think the core.e4 bundles can/should be used in none
> UI-parts/OSGi-Apps as well so I would not see a problem having
> dependencies to e4 in other none-UI bundles.
> 
> If you'd like to use DI in your core as well instead of e.g. use guice
> you can take the implementation coming with e4 and then you could
> naturally use the EventBroker to send out events.
> 
> Tom
> 
> Am 07.07.11 16:47, schrieb Davy Meers:
>> Hello,
>>
>> I am able to handle events in the view using the UIEventTopic
>> annotation. If i also want to inject data from a event the event has to
>> be sent with a event property that has "org.eclipse.e4.data" as key (the
>> value of the static field "IEventBroker.DATA").
>> Is it possible to specify another key for the data that has to be injected?
>>
>> The reason for this question is that not all bundles sending events are
>> e4 related (in my application only UI bundles have dependencies on e4).
>> By requiring to use IEventBroker.DATA there will be an unneeded coupling
>> to e4 (the coupling stays when using the string "org.eclipse.e4.data"
>> directly, it is only implicit).
>>
>> With kind regards,
>> Meers Davy
>>
>>
>>
>> _______________________________________________
>> e4-dev mailing list
>> e4-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
> 
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev



Back to the top