use of org.eclipse.che.ide.oauth.OAuthApiModule in project che by eclipse.
the class CoreGinModule method configure.
@Override
protected void configure() {
install(new JsonRpcModule());
install(new WebSocketModule());
install(new ClientServerEventModule());
install(new UiModule());
install(new ClipboardModule());
install(new EditorApiModule());
install(new EditorPreferencesModule());
install(new NotificationApiModule());
install(new FileTypeApiModule());
install(new ResourceApiModule());
install(new ActionApiModule());
install(new PartApiModule());
install(new DebugApiModule());
install(new ThemeApiModule());
install(new PreferencesApiModule());
install(new PersistenceApiModule());
install(new MacroApiModule());
install(new UserApiModule());
install(new WorkspaceApiModule());
install(new CommandApiModule());
install(new ProjectApiModule());
install(new ProjectImportModule());
install(new OAuthApiModule());
install(new FactoryApiModule());
// configure miscellaneous core components
bind(StandardComponentInitializer.class).in(Singleton.class);
GinMapBinder<String, Component> componentsBinder = GinMapBinder.newMapBinder(binder(), String.class, Component.class);
componentsBinder.addBinding("Standard components").to(StandardComponent.class);
bind(DynaProvider.class).to(DynaProviderImpl.class);
GinMapBinder.newMapBinder(binder(), String.class, FqnProvider.class);
bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
//TODO: don't remove binding until not fix Codenvy and other packaging
bind(String.class).annotatedWith(RestContext.class).toProvider(RestContextProvider.class).in(Singleton.class);
install(new GinFactoryModuleBuilder().build(LoaderFactory.class));
install(new GinFactoryModuleBuilder().build(PopupLoaderFactory.class));
bind(ExtensionRegistry.class).in(Singleton.class);
bind(AppContext.class).to(AppContextImpl.class);
install(new GinFactoryModuleBuilder().build(FindResultNodeFactory.class));
// clients for the REST services
bind(GitServiceClient.class).to(GitServiceClientImpl.class).in(Singleton.class);
bind(SshServiceClient.class).to(SshServiceClientImpl.class).in(Singleton.class);
bind(RecipeServiceClient.class).to(RecipeServiceClientImpl.class).in(Singleton.class);
// IDE agents
bind(SelectionAgent.class).to(SelectionAgentImpl.class).asEagerSingleton();
bind(KeyBindingAgent.class).to(KeyBindingManager.class).in(Singleton.class);
bind(WorkspaceAgent.class).to(WorkspacePresenter.class).in(Singleton.class);
// Exec agent
bind(ExecAgentCommandManager.class).to(JsonRpcExecAgentCommandManager.class);
bind(ExecAgentEventManager.class).to(JsonRpcExecAgentEventManager.class);
bind(ConnectedEventHandler.class).asEagerSingleton();
}
Aggregations