So, the question is: How do I make my e4 views contribute to properties view (3.x)?
I surely can't do something like
partSite.setSelectionProvider(contactsViewer) in pure e4 view, to forward active selection, and I can't change properties view.
I made some experiences where e4 view use selection service, but properties view doesnt catch it, because I think compatibily layer doesnt forward e4 selections.
I'd be very appreciate if someone can help me.
Is it true my whole application has to be 3.x anyway?
i took some time to look a few things up and i might have a possible way to bridge the RCP3 and E4 selection handling. Unfortunately i currently have very little time, that's why i didn't code it to see if it works.
My idea in short:
Create an implementation of the RCP3 ISelectionProvider that listens to the E4 ISelectionService and add it to the RCP3 IWorkbenchPartSite.
A bit more elaborate:
As you know in RCP3 you propagate selection using "IWorkbenchSite.setSelectionProvider(ISelectionProvider provider)" .
Something to try is to let your E4 view implement "ISelectionProvider" .
In some rcp3 code you retrieve this view using the E4 Model Service .
You can get a hold of that service using "getViewSite().getServices()" (this is part of the compatibility layer if i am not mistaken) .
You then add that view as a ISelectionprovider to the IWorkbenchSite.
Another possibility is to create an adapter in some RCP3 code that implements rcp3's "ISelectionProvider" and E4's ISelectionListener .
This adapter retrieves the E4 ESelectionService  (using "getViewSite().getServices()") and adds itself to it as a ISelectionListener.
It also adds itself as a ISelectionProvider to the IWorkbenchSite.
The key point is to have an ISelectionProvider that listens to the E4 ESelectionService.
To achieve this i think the easiest is to to use "getViewSite().getServices()" to get hold of E4 Application services in RCP3 code.
As i said i don't have time to experiment and execute the idea's i have.
So there might be roadblocks but i do hope it will help you to solve the problem.
I agree, but I think there's a problem:
E4 SelectionService (org.eclipse.ui.internal.e4.compatibility.SelectionService) notifies the listeners only if part is CompatibiltyPart, sa we can see in this code: