Differences
This shows you the differences between two versions of the page.
get_eclipse_context [2019/02/05 21:18] |
get_eclipse_context [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Get Eclipse Context ====== | ||
+ | In e4 there are multiple contexts available. One of those contexts can be active. | ||
+ | To get an Eclipse service into an OSGi component the Eclipse context can be used. The Eclipse context can be retrieved through the bundle context. | ||
+ | |||
+ | Bundle bundle = FrameworkUtil.getBundle( MyLogManager.class ); | ||
+ | IEclipseContext context = EclipseContextFactory.getServiceContext( bundle.getBundleContext()); | ||
+ | |||
+ | < | ||
+ | |||
+ | {{tag> |