/** * Returns default bundle-based translation provider. * * @param context * the context for the translation provider * @return bundle-based translation provider */ static public TranslationService bundleTranslationService(IEclipseContext context) { return ContextInjectionFactory.make(BundleTranslationProvider.class, context); }
@Override public Object compute(IEclipseContext context, String contextKey) { if (perspRegistry == null) { perspRegistry = ContextInjectionFactory.make( PerspectiveRegistry.class, e4Context); } return perspRegistry; } });
@Override public Object compute(IEclipseContext context, String contextKey) { if (commandHelpService == null) { commandHelpService = ContextInjectionFactory.make(CommandHelpServiceImpl.class, e4Context); } return commandHelpService; } });
@Override public Object compute(IEclipseContext context) { return ContextInjectionFactory.make(CommandServiceImpl.class, context); } }
@Override public Object compute(IEclipseContext context, String contextKey) { if (viewRegistry == null) { viewRegistry = ContextInjectionFactory.make(ViewRegistry.class, e4Context); } return viewRegistry; } });
@Override public Object compute(IEclipseContext context, String contextKey) { return ContextInjectionFactory.make(HandlerServiceImpl.class, context); } }
@Override public Object compute(IEclipseContext context, String contextKey) { return ContextInjectionFactory.make(SelectionServiceImpl.class, context); } });
@Override public Object compute(IEclipseContext context) { return ContextInjectionFactory.make(DateFormatter.class, context); } }
@Override public Object compute(IEclipseContext context) { return ContextInjectionFactory.make(TemporalAccessorFormatter.class, context); } }
@Override public Object compute(IEclipseContext context, String contextKey) { return ContextInjectionFactory.make(BindingServiceImpl.class, context); }
@Override public Object compute(IEclipseContext context) { return ContextInjectionFactory.make(ResourcePool.class, context); }
@SuppressWarnings("static-method") @PostConstruct void init(Group group, IEclipseContext context) { group.getChildren().add(ContextInjectionFactory.make(PerspectiveSwitcherNode.class, context)); }
@Override public PerspectiveBuilder createPerspectiveBuilder(PerspectiveReader perspReader) { IEclipseContext childContext = context.createChild(); childContext.set(PerspectiveReader.class, perspReader); return ContextInjectionFactory.make(PerspectiveBuilder.class, childContext); }
@Override public ApplicationBuilder createApplicationBuilder(WorkbenchMementoReader reader) { IEclipseContext childContext = context.createChild(); childContext.set(WorkbenchMementoReader.class, reader); return ContextInjectionFactory.make(ApplicationBuilder.class, childContext); }
@Override public Object compute(IEclipseContext context, String contextKey) { EventBroker broker = context.getLocal(EventBroker.class); if (broker == null) { broker = ContextInjectionFactory.make(EventBroker.class, context); context.set(EventBroker.class, broker); } return broker; } }
@Override public Object compute(IEclipseContext context, String contextKey) { if (service == null) { IEclipseContext root = getRootContext(context); manager = new CommandManager(); root.set(CommandManager.class.getName(), manager); service = ContextInjectionFactory.make(CommandServiceImpl.class, root); } return service; }
@Override public Object compute(IEclipseContext context, String contextKey) { ILocaleChangeService lcService = ContextInjectionFactory.make( LocaleChangeServiceImpl.class, context); // add the new object to the application context MApplication application = context.get(MApplication.class); IEclipseContext ctx = application.getContext(); ctx.set(ILocaleChangeService.class, lcService); return lcService; } }
@PostConstruct public void init(IEclipseContext context) { ContextManager contextManager = context.get(ContextManager.class); ContextSet.setComparator(new ContextSet.CComp(contextManager)); context.set(BindingTableManager.class, ContextInjectionFactory.make(BindingTableManager.class, context)); context.set(EBindingService.class.getName(), new BindingServiceCreationFunction()); } }
@SuppressWarnings("static-method") @PostConstruct void init(IEclipseContext context) { ContextManager contextManager = context.get(ContextManager.class); ContextSet.setComparator(new ContextSet.CComp(contextManager)); context.set(BindingTableManager.class, ContextInjectionFactory.make(BindingTableManager.class, context)); context.set(EBindingService.class.getName(), new BindingServiceCreationFunction()); } }
/** * @param context */ @PostConstruct public void init(IEclipseContext context) { ContextManager contextManager = context.get(ContextManager.class); ContextSet.setComparator(new ContextSet.CComp(contextManager)); context.set(BindingTableManager.class, ContextInjectionFactory.make(BindingTableManager.class, context)); context.set(EBindingService.class.getName(), new BindingServiceCreationFunction()); } }