Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » eventBroker to a particular perspective
eventBroker to a particular perspective [message #1103013] Fri, 06 September 2013 05:44 Go to next message
Eclipse UserFriend
Hi everyone,

I am doing an RCP application with 2 identical perspectives with 2 views.
I want to send an event from one view to the other.

First view :
eventBroker.send("message", model);


Second view :
@Inject @Optional
void eventReceived(@UIEventTopic("message/*") Model model) {
//CODE
}


My problem is that both perspectives receive the event.
How can i specify to send it to the activate perspective only ?

(both perspectives point to the exact same code)

Thanks for your help !
Romain.
Re: eventBroker to a particular perspective [message #1103244 is a reply to message #1103013] Fri, 06 September 2013 10:28 Go to previous messageGo to next message
Eclipse UserFriend
All events are global in the sense that they're sent to every listener for the topic. Generally what you'd do is to encode the MPart you want to have react to the message in the 'payload' (we use a Map for the UIModel events so looking at UIEventPublisher might give some hints).

Alternatively you could just define different topics for each view (i.e. "messageFromA" and "messageFromB") to derermine who gets what event.
Re: eventBroker to a particular perspective [message #1105996 is a reply to message #1103013] Tue, 10 September 2013 10:41 Go to previous message
Eclipse UserFriend
Thank you !
It helped a lot.
Previous Topic:add element to e4XMI
Next Topic:change handled tool item label
Goto Forum:
  


Current Time: Sat Jul 05 12:10:43 EDT 2025

Powered by FUDForum. Page generated in 0.18605 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top