java.lang.NullPointerException
at fzi.activemq.rcp.launcher.ui.parts.LowerLeft.configurationSelected(LowerLeft.java:40)
at fzi.activemq.rcp.launcher.Composites.upperleft.SelectComposite$1.widgetSelected(SelectComposite.java:45)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Where iEclipseContext is IEclipseContext variable. IEclipseContext automatically inject when eclipse framework will create your object . Like in case of handler.
But if you are creating your object then its your responsibility to inject it.

Thx for your reply. Is it possible to use injection similar in Listeners as in Handlers (it didnt work when I tried it but I wouldnt be that surprised if I messed that up..)?
Otherwise, how can i get my hands on an instance of IEclipseContext? Rly tried to figure that out myselve, but no matter how many sites I browse, it seems that this is only used with injection...

Just to elaborate on Sumit's answer -- you need to obtain a context from somewhere. Sumit's code uses the top-level OSGi context, which works in this case as the EPartService is effectively a singleton registered as an OSGi service. But you'll find that this won't work for other services as they will be registered at other points in the context tree. Generally you should do lookups from the closest context that you can find, and many of the UI classes carry a context (see the subclasses of MContext). In Eclipse 3.x compat layer, you can obtain the IEC for a part using: