Eclipse 4 with both views (3.x and e4) [message #1021251] |
Tue, 19 March 2013 14:33  |
Eclipse User |
|
|
|
I hope someone can help me with a problem I have because I've tried eclipse forum two or three times and I got nothing.
My E4RCP uses two graphiti editors (3.x based) which contribute to properties view (also 3.x based).
I developed two more e4 views, and I want them to contribute to properties view.
I understand my e4 views should use selection service as described in http://www.vogella.com/articles/Eclipse4Services/article.html or http://wiki.eclipse.org/E4/EAS/Selection, and I see that properties view use the old fashioned way to retrive active selection from views which propapagate selection like this:
private void attachSelectionProvider() {
IWorkbenchPartSite partSite = getSite();
partSite.setSelectionProvider(contactsViewer);
}
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.
Any advises
I'd be very appreciate if someone can help me.
Is it true my whole application has to be 3.x anyway?
Thanks in advance
rui domingues
|
|
|
|
Re: Eclipse 4 with both views (3.x and e4) [message #1022731 is a reply to message #1021364] |
Fri, 22 March 2013 08:45  |
Eclipse User |
|
|
|
Hi. Tks for replying.
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:
Object client = part.getObject();
if (client instanceof CompatibilityPart) {
IWorkbenchPart workbenchPart = ((CompatibilityPart) client).getPart();
notifyListeners(part.getElementId(), workbenchPart, (ISelection) selection);
}
if (page != null) {
page.updateShowInSources(part);
}
So I think this is not possible.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.19488 seconds