Search in sources :

Example 1 with GinFactoryModuleBuilder

use of com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder in project che by eclipse.

the class IDEClientModule method configure.

/** {@inheritDoc} */
@Override
protected void configure() {
    bind(BootstrapController.class).in(Singleton.class);
    bind(StyleInjector.class).in(Singleton.class);
    install(new GinFactoryModuleBuilder().implement(PartButton.class, PartButtonWidget.class).implement(EditorTab.class, EditorTabWidget.class).build(TabItemFactory.class));
    bind(ResolvingProjectStateHolderRegistry.class).to(ResolvingProjectStateHolderRegistryImpl.class);
    bind(EditorPartStack.class).to(EditorPartStackPresenter.class);
    install(new GinFactoryModuleBuilder().implement(SplitEditorPartView.class, SplitEditorPartViewImpl.class).build(SplitEditorPartViewFactory.class));
}
Also used : PartButton(org.eclipse.che.ide.part.widgets.partbutton.PartButton) ResolvingProjectStateHolderRegistry(org.eclipse.che.ide.project.ResolvingProjectStateHolderRegistry) GinFactoryModuleBuilder(com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder) PartButtonWidget(org.eclipse.che.ide.part.widgets.partbutton.PartButtonWidget) SplitEditorPartViewFactory(org.eclipse.che.ide.part.editor.multipart.SplitEditorPartViewFactory) TabItemFactory(org.eclipse.che.ide.part.widgets.TabItemFactory) EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Example 2 with GinFactoryModuleBuilder

use of com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder 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();
}
Also used : ActionApiModule(org.eclipse.che.ide.actions.ActionApiModule) DebugApiModule(org.eclipse.che.ide.debug.DebugApiModule) PreferencesApiModule(org.eclipse.che.ide.preferences.PreferencesApiModule) ConnectedEventHandler(org.eclipse.che.ide.api.machine.execagent.ConnectedEventHandler) ResourceApiModule(org.eclipse.che.ide.resources.ResourceApiModule) FileTypeApiModule(org.eclipse.che.ide.filetypes.FileTypeApiModule) PopupLoaderFactory(org.eclipse.che.ide.ui.loaders.PopupLoaderFactory) EditorPreferencesModule(org.eclipse.che.ide.editor.preferences.EditorPreferencesModule) ThemeApiModule(org.eclipse.che.ide.theme.ThemeApiModule) PersistenceApiModule(org.eclipse.che.ide.statepersistance.PersistenceApiModule) ExtensionRegistry(org.eclipse.che.ide.api.extension.ExtensionRegistry) GitServiceClientImpl(org.eclipse.che.ide.api.git.GitServiceClientImpl) SelectionAgentImpl(org.eclipse.che.ide.selection.SelectionAgentImpl) RecipeServiceClientImpl(org.eclipse.che.ide.api.machine.RecipeServiceClientImpl) ExecAgentEventManager(org.eclipse.che.ide.api.machine.ExecAgentEventManager) JsonRpcExecAgentEventManager(org.eclipse.che.ide.api.machine.execagent.JsonRpcExecAgentEventManager) MacroApiModule(org.eclipse.che.ide.macro.MacroApiModule) SshServiceClientImpl(org.eclipse.che.ide.api.ssh.SshServiceClientImpl) ProjectImportModule(org.eclipse.che.ide.projectimport.ProjectImportModule) Component(org.eclipse.che.ide.api.component.Component) FactoryApiModule(org.eclipse.che.ide.factory.FactoryApiModule) WorkspacePresenter(org.eclipse.che.ide.workspace.WorkspacePresenter) WorkspaceApiModule(org.eclipse.che.ide.workspace.WorkspaceApiModule) AppContext(org.eclipse.che.ide.api.app.AppContext) GinFactoryModuleBuilder(com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder) ProjectApiModule(org.eclipse.che.ide.project.ProjectApiModule) CommandApiModule(org.eclipse.che.ide.command.CommandApiModule) ClipboardModule(org.eclipse.che.ide.clipboard.ClipboardModule) OAuthApiModule(org.eclipse.che.ide.oauth.OAuthApiModule) PartApiModule(org.eclipse.che.ide.part.PartApiModule) NotificationApiModule(org.eclipse.che.ide.notification.NotificationApiModule) JsonRpcExecAgentCommandManager(org.eclipse.che.ide.api.machine.execagent.JsonRpcExecAgentCommandManager) ExecAgentCommandManager(org.eclipse.che.ide.api.machine.ExecAgentCommandManager) SimpleEventBus(com.google.web.bindery.event.shared.SimpleEventBus) RestContextProvider(org.eclipse.che.ide.rest.RestContextProvider) PopupLoaderFactory(org.eclipse.che.ide.ui.loaders.PopupLoaderFactory) LoaderFactory(org.eclipse.che.ide.ui.loaders.request.LoaderFactory) FindResultNodeFactory(org.eclipse.che.ide.search.factory.FindResultNodeFactory) KeyBindingManager(org.eclipse.che.ide.keybinding.KeyBindingManager) EditorApiModule(org.eclipse.che.ide.editor.EditorApiModule) DynaProvider(org.eclipse.che.providers.DynaProvider) UserApiModule(org.eclipse.che.ide.user.UserApiModule)

Example 3 with GinFactoryModuleBuilder

use of com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder in project che by eclipse.

the class SubversionGinModule method configure.

/**
     * {@inheritDoc}
     */
@Override
protected void configure() {
    bind(SubversionClientService.class).to(SubversionClientServiceImpl.class).in(Singleton.class);
    GinMultibinder.newSetBinder(binder(), ImportWizardRegistrar.class).addBinding().to(SubversionImportWizardRegistrar.class);
    bind(SubversionProjectImporterView.class).to(SubversionProjectImporterViewImpl.class).in(Singleton.class);
    bind(SubversionOutputConsoleView.class).to(SubversionOutputConsoleViewImpl.class);
    bind(UpdateToRevisionView.class).to(UpdateToRevisionViewImpl.class).in(Singleton.class);
    bind(SwitchView.class).to(SwitchViewImpl.class).in(Singleton.class);
    bind(LocationSelectorView.class).to(LocationSelectorViewImpl.class).in(Singleton.class);
    bind(ResolveView.class).to(ResolveViewImpl.class).in(Singleton.class);
    bind(ExportView.class).to(ExportViewImpl.class).in(Singleton.class);
    bind(ShowLogsView.class).to(ShowLogsViewImpl.class).in(Singleton.class);
    bind(PropertyEditorView.class).to(PropertyEditorViewImpl.class).in(Singleton.class);
    bind(CommitView.class).to(CommitViewImpl.class).in(Singleton.class);
    bind(DiffViewerView.class).to(DiffViewerViewImpl.class).in(Singleton.class);
    bind(SubversionCredentialsDialog.class).to(SubversionCredentialsDialogImpl.class);
    install(new GinFactoryModuleBuilder().implement(ChoiceDialog.class, ChoiceDialogPresenter.class).build(ChoiceDialogFactory.class));
    bind(ChoiceDialogView.class).to(ChoiceDialogViewImpl.class);
    install(new GinFactoryModuleBuilder().implement(SubversionOutputConsole.class, SubversionOutputConsolePresenter.class).build(SubversionOutputConsoleFactory.class));
}
Also used : SubversionClientServiceImpl(org.eclipse.che.plugin.svn.ide.SubversionClientServiceImpl) CommitViewImpl(org.eclipse.che.plugin.svn.ide.commit.CommitViewImpl) LocationSelectorViewImpl(org.eclipse.che.plugin.svn.ide.sw.LocationSelectorViewImpl) ChoiceDialogView(org.eclipse.che.plugin.svn.ide.common.threechoices.ChoiceDialogView) SubversionProjectImporterViewImpl(org.eclipse.che.plugin.svn.ide.importer.SubversionProjectImporterViewImpl) SwitchViewImpl(org.eclipse.che.plugin.svn.ide.sw.SwitchViewImpl) PropertyEditorViewImpl(org.eclipse.che.plugin.svn.ide.property.PropertyEditorViewImpl) GinFactoryModuleBuilder(com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder) ChoiceDialogFactory(org.eclipse.che.plugin.svn.ide.common.threechoices.ChoiceDialogFactory) ResolveViewImpl(org.eclipse.che.plugin.svn.ide.resolve.ResolveViewImpl) UpdateToRevisionViewImpl(org.eclipse.che.plugin.svn.ide.update.UpdateToRevisionViewImpl) DiffViewerViewImpl(org.eclipse.che.plugin.svn.ide.commit.diff.DiffViewerViewImpl) SubversionOutputConsoleView(org.eclipse.che.plugin.svn.ide.common.SubversionOutputConsoleView) ExportViewImpl(org.eclipse.che.plugin.svn.ide.export.ExportViewImpl) SubversionOutputConsoleFactory(org.eclipse.che.plugin.svn.ide.common.SubversionOutputConsoleFactory) ShowLogsViewImpl(org.eclipse.che.plugin.svn.ide.log.ShowLogsViewImpl) SubversionCredentialsDialog(org.eclipse.che.ide.api.subversion.SubversionCredentialsDialog)

Example 4 with GinFactoryModuleBuilder

use of com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder in project che by eclipse.

the class GitGinModule method configure.

/** {@inheritDoc} */
@Override
protected void configure() {
    GinMultibinder.newSetBinder(binder(), ImportWizardRegistrar.class).addBinding().to(GitImportWizardRegistrar.class);
    GinMultibinder.newSetBinder(binder(), PreferencePagePresenter.class).addBinding().to(CommitterPreferencePresenter.class);
    bind(AddToIndexView.class).to(AddToIndexViewImpl.class).in(Singleton.class);
    bind(ResetToCommitView.class).to(ResetToCommitViewImpl.class).in(Singleton.class);
    bind(RemoveFromIndexView.class).to(RemoveFromIndexViewImpl.class).in(Singleton.class);
    bind(RevisionListView.class).to(RevisionListViewImpl.class).in(Singleton.class);
    bind(CommitView.class).to(CommitViewImpl.class).in(Singleton.class);
    bind(ChangedListView.class).to(ChangedListViewImpl.class).in(Singleton.class);
    bind(BranchView.class).to(BranchViewImpl.class).in(Singleton.class);
    bind(BranchListView.class).to(BranchListViewImpl.class).in(Singleton.class);
    bind(MergeView.class).to(MergeViewImpl.class).in(Singleton.class);
    bind(ResetFilesView.class).to(ResetFilesViewImpl.class).in(Singleton.class);
    bind(RemoteView.class).to(RemoteViewImpl.class).in(Singleton.class);
    bind(AddRemoteRepositoryView.class).to(AddRemoteRepositoryViewImpl.class).in(Singleton.class);
    bind(PushToRemoteView.class).to(PushToRemoteViewImpl.class).in(Singleton.class);
    bind(FetchView.class).to(FetchViewImpl.class).in(Singleton.class);
    bind(PullView.class).to(PullViewImpl.class).in(Singleton.class);
    bind(HistoryView.class).to(HistoryViewImpl.class).in(Singleton.class);
    bind(GitOutputPartView.class).to(GitOutputPartViewImpl.class);
    install(new GinFactoryModuleBuilder().implement(GitOutputConsole.class, GitOutputConsolePresenter.class).build(GitOutputConsoleFactory.class));
    bind(GitCheckoutStatusNotificationOperation.class).asEagerSingleton();
}
Also used : AddToIndexViewImpl(org.eclipse.che.ide.ext.git.client.add.AddToIndexViewImpl) ResetToCommitViewImpl(org.eclipse.che.ide.ext.git.client.reset.commit.ResetToCommitViewImpl) CommitViewImpl(org.eclipse.che.ide.ext.git.client.commit.CommitViewImpl) ResetToCommitViewImpl(org.eclipse.che.ide.ext.git.client.reset.commit.ResetToCommitViewImpl) MergeViewImpl(org.eclipse.che.ide.ext.git.client.merge.MergeViewImpl) HistoryViewImpl(org.eclipse.che.ide.ext.git.client.history.HistoryViewImpl) RevisionListViewImpl(org.eclipse.che.ide.ext.git.client.compare.revisionsList.RevisionListViewImpl) FetchViewImpl(org.eclipse.che.ide.ext.git.client.fetch.FetchViewImpl) PushToRemoteViewImpl(org.eclipse.che.ide.ext.git.client.push.PushToRemoteViewImpl) RemoteViewImpl(org.eclipse.che.ide.ext.git.client.remote.RemoteViewImpl) PushToRemoteViewImpl(org.eclipse.che.ide.ext.git.client.push.PushToRemoteViewImpl) GinFactoryModuleBuilder(com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder) PullViewImpl(org.eclipse.che.ide.ext.git.client.pull.PullViewImpl) AddRemoteRepositoryViewImpl(org.eclipse.che.ide.ext.git.client.remote.add.AddRemoteRepositoryViewImpl) BranchViewImpl(org.eclipse.che.ide.ext.git.client.branch.BranchViewImpl) BranchListViewImpl(org.eclipse.che.ide.ext.git.client.compare.branchList.BranchListViewImpl) ChangedListViewImpl(org.eclipse.che.ide.ext.git.client.compare.changedList.ChangedListViewImpl) GitOutputPartView(org.eclipse.che.ide.ext.git.client.outputconsole.GitOutputPartView) GitCheckoutStatusNotificationOperation(org.eclipse.che.ide.ext.git.client.GitCheckoutStatusNotificationOperation) ResetFilesViewImpl(org.eclipse.che.ide.ext.git.client.reset.files.ResetFilesViewImpl) GitOutputConsoleFactory(org.eclipse.che.ide.ext.git.client.outputconsole.GitOutputConsoleFactory) RemoveFromIndexViewImpl(org.eclipse.che.ide.ext.git.client.remove.RemoveFromIndexViewImpl)

Example 5 with GinFactoryModuleBuilder

use of com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder in project che by eclipse.

the class EditorApiModule method configure.

@Override
protected void configure() {
    bind(EditorAgent.class).to(EditorAgentImpl.class).in(Singleton.class);
    bind(UserActivityManager.class).in(Singleton.class);
    bind(EditorRegistry.class).to(EditorRegistryImpl.class).in(Singleton.class);
    bind(EditorPartStackView.class);
    bind(EditorContentSynchronizer.class).to(EditorContentSynchronizerImpl.class).in(Singleton.class);
    bind(EditorGroupSynchronization.class).to(EditorGroupSynchronizationImpl.class);
    // the text editor view
    bind(TextEditorPartView.class).to(TextEditorPartViewImpl.class);
    // Bind the file type identifier
    bind(FileTypeIdentifier.class).to(MultipleMethodFileIdentifier.class);
    // bind the document storage
    bind(DocumentStorage.class);
    // bind the default editor
    bind(EditorProvider.class).annotatedWith(Names.named("defaultEditor")).to(DefaultTextEditorProvider.class);
    // bind the info panel
    bind(InfoPanel.class);
    // bind the document position model
    bind(DocumentPositionMap.class).to(DocumentPositionMapImpl.class);
    // bind the reconciler
    install(new GinFactoryModuleBuilder().implement(Reconciler.class, ReconcilerWithAutoSave.class).build(ReconcilerFactory.class));
    // bind the code assistant and quick assistant
    install(new GinFactoryModuleBuilder().implement(CodeAssistant.class, CodeAssistantImpl.class).build(CodeAssistantFactory.class));
    install(new GinFactoryModuleBuilder().implement(QuickAssistAssistant.class, QuickAssistAssistantImpl.class).build(QuickAssistantFactory.class));
    // bind the quick assist widget factory
    install(new GinFactoryModuleBuilder().build(QuickAssistWidgetFactory.class));
    install(new GinFactoryModuleBuilder().build(EditorTabContextMenuFactory.class));
    install(new GinFactoryModuleBuilder().build(RecentFileActionFactory.class));
    bind(RecentFileList.class).to(RecentFileStore.class).in(Singleton.class);
}
Also used : RecentFileStore(org.eclipse.che.ide.part.editor.recent.RecentFileStore) QuickAssistantFactory(org.eclipse.che.ide.api.editor.quickfix.QuickAssistantFactory) EditorGroupSynchronization(org.eclipse.che.ide.editor.synchronization.EditorGroupSynchronization) GinFactoryModuleBuilder(com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder) ReconcilerFactory(org.eclipse.che.ide.api.editor.reconciler.ReconcilerFactory) RecentFileActionFactory(org.eclipse.che.ide.part.editor.recent.RecentFileActionFactory) EditorContentSynchronizerImpl(org.eclipse.che.ide.editor.synchronization.EditorContentSynchronizerImpl) QuickAssistWidgetFactory(org.eclipse.che.ide.editor.quickfix.QuickAssistWidgetFactory) TextEditorPartView(org.eclipse.che.ide.api.editor.texteditor.TextEditorPartView) CodeAssistantFactory(org.eclipse.che.ide.api.editor.codeassist.CodeAssistantFactory) FileTypeIdentifier(org.eclipse.che.ide.api.editor.filetype.FileTypeIdentifier) UserActivityManager(org.eclipse.che.ide.util.executor.UserActivityManager) DocumentPositionMap(org.eclipse.che.ide.api.editor.partition.DocumentPositionMap) EditorTabContextMenuFactory(org.eclipse.che.ide.part.editor.EditorTabContextMenuFactory)

Aggregations

GinFactoryModuleBuilder (com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder)14 Component (org.eclipse.che.ide.api.component.Component)2 ToolbarPresenter (org.eclipse.che.ide.ui.toolbar.ToolbarPresenter)2 SimpleEventBus (com.google.web.bindery.event.shared.SimpleEventBus)1 Resources (org.eclipse.che.ide.Resources)1 ActionApiModule (org.eclipse.che.ide.actions.ActionApiModule)1 AppContext (org.eclipse.che.ide.api.app.AppContext)1 BreakpointRendererFactory (org.eclipse.che.ide.api.debug.BreakpointRendererFactory)1 DebuggerServiceClientImpl (org.eclipse.che.ide.api.debug.DebuggerServiceClientImpl)1 ChoiceDialog (org.eclipse.che.ide.api.dialogs.ChoiceDialog)1 DialogFactory (org.eclipse.che.ide.api.dialogs.DialogFactory)1 MessageDialog (org.eclipse.che.ide.api.dialogs.MessageDialog)1 CodeAssistantFactory (org.eclipse.che.ide.api.editor.codeassist.CodeAssistantFactory)1 FileTypeIdentifier (org.eclipse.che.ide.api.editor.filetype.FileTypeIdentifier)1 DocumentPositionMap (org.eclipse.che.ide.api.editor.partition.DocumentPositionMap)1 QuickAssistantFactory (org.eclipse.che.ide.api.editor.quickfix.QuickAssistantFactory)1 ReconcilerFactory (org.eclipse.che.ide.api.editor.reconciler.ReconcilerFactory)1 TextEditorPartView (org.eclipse.che.ide.api.editor.texteditor.TextEditorPartView)1 ExtensionRegistry (org.eclipse.che.ide.api.extension.ExtensionRegistry)1 GitServiceClientImpl (org.eclipse.che.ide.api.git.GitServiceClientImpl)1