Ok I see why this does not work on the compat layer. The reason is that the the bootstraping does not create an E4Workbench instance.
I guess we could make the compat workbench implement org.eclipse.e4.ui.workbench.IWorkbench and then do the same registration as we do in the e4 case. Tom On 22.01.14 18:21, Wim Jongman wrote: > Not in the e3 RCP mail example ... > > Met vriendelijke groet, > > Wim > > On 22 jan. 2014, at 18:07, Tom Schindl <[email protected] > <mailto:[email protected]>> wrote: > >> We are registering the IWorkbench which is the E4Workbench in the osgi >> registry! >> >> Tom >> >> Von meinem iPhone gesendet >> >> Am 22.01.2014 um 17:50 schrieb Jonas Helming >> <[email protected] <mailto:[email protected]>>: >> >>> Hi Wim, >>> >>> I was looking for a way to retrieve the IContext using OSGi quite >>> recently, but so far I did not found one... >>> >>> >>> Regards >>> >>> Jonas >>> >>> Am 22.01.2014 17:48, schrieb Wim Jongman: >>>> Nice! Thanks. I was looking through the OSGi registry hoping to find >>>> something useful but I didn't. In the IDE I found the IWorkbench >>>> service but that is not available in a small RCP app. I didn't think >>>> of looking thru the platform services. >>>> >>>> Thanks again. >>>> >>>> Cheers, >>>> >>>> Wim >>>> >>>> >>>> >>>> On Wed, Jan 22, 2014 at 5:27 PM, Lars Vogel <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> FYI site refers to getViewSite() in a ViewPart. >>>> >>>> >>>> 2014/1/22 Lars Vogel <[email protected] >>>> <mailto:[email protected]>> >>>> >>>> Just get the local context via: >>>> >>>> IEclipseContext parentContext = (IEclipseContext) >>>> site.getService(IEclipseContext.class); >>>> >>>> afterwards you can retrieve every element from this context >>>> via its key, i.g. EModelService >>>> >>>> >>>> 2014/1/22 Wim Jongman <[email protected] >>>> <mailto:[email protected]>> >>>> >>>> Guys, if I am in a small RCP 3x application like the 3x >>>> mail example. How do I get hold of the model service >>>> programmatically? >>>> >>>> TIA >>>> >>>> _______________________________________________ >>>> e4-dev mailing list >>>> [email protected] <mailto:[email protected]> >>>> https://dev.eclipse.org/mailman/listinfo/e4-dev >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> e4-dev mailing list >>>> [email protected] <mailto:[email protected]> >>>> https://dev.eclipse.org/mailman/listinfo/e4-dev >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> e4-dev mailing list >>>> [email protected] >>>> https://dev.eclipse.org/mailman/listinfo/e4-dev >>> >>> _______________________________________________ >>> e4-dev mailing list >>> [email protected] <mailto:[email protected]> >>> https://dev.eclipse.org/mailman/listinfo/e4-dev >> _______________________________________________ >> e4-dev mailing list >> [email protected] <mailto:[email protected]> >> https://dev.eclipse.org/mailman/listinfo/e4-dev > > > _______________________________________________ > e4-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/e4-dev > _______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
