[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Inter-view events?

Hello,

I have a view that I want it to fire a given event, an another view to catch
that event and react to it.
If the event is a selection event, then I can use:
        getSite().setSelectionProvider(provider);
from the event source view, and:
        getViewSite().getPage().addSelectionListener(listener);
from the event listener view.

But there are two problems:

1.- What if I want to generate other kind of events? I can always "mask" my
event as a fake selection event, but it is some kind of hack and then there
is problem #2.

2.- Apparently the "setSelectionProvider" allows for a single selection
provider per workbench (correct me if I am wrong). This is a big limitation
if I want to generate events from more than one view.

There is always the alternative to make the two views know each other, but
this is not very nice as potentially one view may be present in the
beginning and the other is opened later... then registration would be very
complex.

Is there a generic event mechanism at the workbench or page level? How can I
solve this problem?

Thank you in advance,

    Luis.