public static IEclipseContext createDefaultContext() {
IEclipseContext serviceContext = E4Workbench.getServiceContext();
final IEclipseContext appContext = serviceContext.createChild("WorkbenchContext");
IExtensionRegistry registry = RegistryFactory.getRegistry();
ExceptionHandler exceptionHandler = new ExceptionHandler();
ReflectionContributionFactory contributionFactory = new ReflectionContributionFactory(registry);
appContext.set(IContributionFactory.class.getName(), contributionFactory);
// No default log provider available
if (appContext.get(ILoggerProvider.class) == null) {
serviceContext.set(ILoggerProvider.class, ContextInjectionFactory.make(LoggerProviderImpl.class, serviceContext));