@Override protected void configure() { if (!isInstalled) { bind(UrlUtils.class).to(ClientUrlUtils.class).in(Singleton.class); isInstalled = true; } } }
@Override protected void configure() { if (!isInstalled) { bind(UrlUtils.class).to(ClientUrlUtils.class).in(Singleton.class); isInstalled = true; } } }
@Override protected void configure() { // TODO: Move jackson implementation to an extension registerSerializationBinding(binder()).to(JsonSerialization.class).in(Singleton.class); newSetBinder(binder(), JacksonMapperProvider.class); bind(JacksonMapperProvider.class).to(DispatchingJacksonMapperProvider.class).in(Singleton.class); } }
@Override protected void configureDispatch() { bind(RpcDispatchCallFactory.class).to(builder.getDispatchCallFactory()).in(Singleton.class); bind(DispatchAsync.class).to(builder.getDispatchAsync()).in(Singleton.class); bind(RpcInterceptorRegistry.class).to(builder.getInterceptorRegistry()).in(Singleton.class); bind(RpcDispatchHooks.class).to(builder.getDispatchHooks()).in(Singleton.class); bindAnnotated(ExceptionHandler.class).to(builder.getExceptionHandler()); }
/** * Binds the components related with the federation configuration path */ private void bindFederation() { bindPresenter(FederationPresenter.class, FederationPresenter.MyView.class, NewFederationView.class, FederationPresenter.MyProxy.class); bind(FederationStore.class).to(FederationStoreImpl.class).in(Singleton.class); bind(DeploymentFederationStore.class).to(DeploymentFederationStoreImpl.class).in(Singleton.class); bind(DeploymentManager.class).in(Singleton.class); bind(FederationManager.class); } }
private void bindEventBus() { // Bind actual (non-legacy) EventBus to its legacy interface bind(com.google.web.bindery.event.shared.EventBus.class).to(com.google.gwt.event.shared.EventBus.class); // Bind legacy EventBus interface to SimpleEventBus implementation bind(com.google.gwt.event.shared.EventBus.class).to(SimpleEventBus.class).in(Singleton.class); }
@Override protected void configure() { bind(DebuggerServiceClient.class).to(DebuggerServiceClientImpl.class).in(Singleton.class); install( new GinFactoryModuleBuilder() .implement(BreakpointRenderer.class, BreakpointRendererImpl.class) .build(BreakpointRendererFactory.class)); bind(BreakpointStorage.class).to(BreakpointStorageImpl.class); bind(BreakpointManager.class).to(BreakpointManagerImpl.class).in(Singleton.class); } }
@Override protected void configure() { bind(EventBus.class).annotatedWith(Names.named("emite")).to(LoggingEventBus.class).in(Singleton.class); bind(XmppConnection.class).to(XmppConnectionBosh.class); bind(XmppSession.class).to(XmppSessionImpl.class); }
@Override protected void configure() { bind(FormatterPreferencePageView.class) .to(FormatterPreferencePageViewImpl.class) .in(Singleton.class); final GinMultibinder<PreferencePagePresenter> prefBinder = GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class); prefBinder.addBinding().to(FormatterPreferencePagePresenter.class); } }
@Override protected void configure() { GinMultibinder.newSetBinder(binder(), DebugConfigurationType.class) .addBinding() .to(NodeJsDebuggerConfigurationType.class); bind(NodeJsDebuggerConfigurationPageView.class) .to(NodeJsDebuggerConfigurationPageViewImpl.class) .in(Singleton.class); } }
@Override protected void configure() { GinMultibinder.newSetBinder(binder(), OAuth2Authenticator.class) .addBinding() .to(DefaultOAuthAuthenticatorImpl.class); bind(OAuth2AuthenticatorRegistry.class) .to(OAuth2AuthenticatorRegistryImpl.class) .in(Singleton.class); } }
@Override protected void configure() { install(new CommonGinModule()); bind(RootPresenter.class).asEagerSingleton(); bind(EventBus.class).to(builder.getEventBusClass()).in(Singleton.class); bind(TokenFormatter.class).to(builder.getTokenFormatterClass()).in(Singleton.class); bind(PlaceManager.class).to(builder.getPlaceManagerClass()).in(Singleton.class); maybeBindConstant(DefaultPlace.class, builder.getDefaultPlace()); maybeBindConstant(ErrorPlace.class, builder.getErrorPlace()); maybeBindConstant(UnauthorizedPlace.class, builder.getUnauthorizedPlace()); }
@Override protected void configure() { bind(FileOpenCloseEventListener.class).asEagerSingleton(); bind(ClientServerEventService.class).to(ClientServerEventServiceImpl.class).in(Singleton.class); bind(EditorFileStatusNotificationOperation.class).asEagerSingleton(); bind(FileWatcherExcludesOperation.class).asEagerSingleton(); } }
@Override protected void configure() { bind(ThemeAgent.class).to(ThemeAgentImpl.class).in(Singleton.class); bind(ThemeAgent.class).asEagerSingleton(); GinMultibinder<Theme> themeBinder = GinMultibinder.newSetBinder(binder(), Theme.class); themeBinder.addBinding().to(DarkTheme.class); themeBinder.addBinding().to(LightTheme.class); } }
private void bindFrontendInfrastructure() { bind(Frontend.class).in(Singleton.class); requestStaticInjection(Frontend.InstanceHolder.class); bind(VdcOperationManager.class).in(Singleton.class); bind(OperationProcessor.class).in(Singleton.class); bind(CommunicationProvider.class).to(GWTRPCCommunicationProvider.class).in(Singleton.class); bind(XsrfRpcRequestBuilder.class).in(Singleton.class); }
protected void bindCommonIntegration() { bind(ITypeResolver.class).to(UiCommonDefaultTypeResolver.class).asEagerSingleton(); bind(FrontendEventsHandlerImpl.class).in(Singleton.class); bind(FrontendFailureEventListener.class).in(Singleton.class); bind(ILogger.class).to(LoggerImpl.class).in(Singleton.class); // User Options bind(OptionsModel.class).in(Singleton.class); bindCommonModelProviders(); bindConsoles(); }