@Override protected void configure() { bind(ClipboardButtonBuilder.class).to(ClipboardButtonBuilderImpl.class); } }
@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() { bind(PairChatManager.class).to(PairChatManagerImpl.class).asEagerSingleton(); bind(PresenceManager.class).to(PresenceManagerImpl.class).asEagerSingleton(); bind(SubscriptionManager.class).to(SubscriptionManagerImpl.class).asEagerSingleton(); bind(XmppRoster.class).to(XmppRosterImpl.class).asEagerSingleton(); }
@Override protected void configure() { bind(WebSocketEndpoint.class).to(BasicWebSocketEndpoint.class); bind(WebSocketMessageTransmitter.class).to(BasicWebSocketMessageTransmitter.class); bind(WebSocketMessageReceiver.class).to(JsonRpcMessageReceiver.class); install( new GinFactoryModuleBuilder() .implement(WebSocketConnection.class, DelayableWebSocketConnection.class) .build(WebSocketFactory.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 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); } }
@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); } }
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(); }
@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(ProcessesOutputRestorer.class).asEagerSingleton(); bind(MachineFailNotifier.class).asEagerSingleton(); bind(MachineChooserView.class).to(MachineChooserViewImpl.class); bind(ModuleHolder.class).in(Singleton.class); bindConstant() .annotatedWith(Names.named("machine.extension.api_port")) .to(Constants.WS_AGENT_PORT); } }
@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 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); } }
@Override protected void configure() { bind(AppStateTracker.class).asEagerSingleton(); bind(AppStateManager.class).asEagerSingleton(); bind(AppStateServiceClient.class).to(AppStateServiceClientImpl.class); GinMultibinder<StateComponent> stateComponents = GinMultibinder.newSetBinder(binder(), StateComponent.class); stateComponents.addBinding().to(WorkspacePresenter.class); stateComponents.addBinding().to(EditorAgentImpl.class); stateComponents.addBinding().to(ProjectExplorerStateComponent.class); } }