Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default new ContainerModule(bind => {
bind(SearchInWorkspaceContextKeyService).toSelf().inSingletonScope();
bind(SearchInWorkspaceWidget).toSelf();
bind(WidgetFactory).toDynamicValue(ctx => ({
id: SearchInWorkspaceWidget.ID,
createWidget: () => ctx.container.get(SearchInWorkspaceWidget)
}));
bind(SearchInWorkspaceResultTreeWidget).toDynamicValue(ctx => createSearchTreeWidget(ctx.container));
bindViewContribution(bind, SearchInWorkspaceFrontendContribution);
bind(FrontendApplicationContribution).toService(SearchInWorkspaceFrontendContribution);
bind(TabBarToolbarContribution).toService(SearchInWorkspaceFrontendContribution);
// The object that gets notified of search results.
bind(SearchInWorkspaceClientImpl).toSelf().inSingletonScope();
bind(SearchInWorkspaceService).toSelf().inSingletonScope();
// The object to call methods on the backend.
bind(SearchInWorkspaceServer).toDynamicValue(ctx => {
const client = ctx.container.get(SearchInWorkspaceClientImpl);
return WebSocketConnectionProvider.createProxy(ctx.container, SIW_WS_PATH, client);
}).inSingletonScope();
bind(InMemoryTextResourceResolver).toSelf().inSingletonScope();
bind(ResourceResolver).toService(InMemoryTextResourceResolver);
static bindContribution(bind: interfaces.Bind): void {
bind(InDebugReplContextKey).toDynamicValue(({ container }) =>
container.get(ContextKeyService).createKey('inDebugRepl', false)
).inSingletonScope();
bind(DebugConsoleSession).toSelf().inSingletonScope();
bindViewContribution(bind, DebugConsoleContribution).onActivation((context, _) => {
// eagerly initialize the debug console session
context.container.get(DebugConsoleSession);
return _;
});
bind(TabBarToolbarContribution).toService(DebugConsoleContribution);
bind(WidgetFactory).toDynamicValue(({ container }) => ({
id: DebugConsoleContribution.options.id,
createWidget: () => DebugConsoleContribution.create(container)
}));
}
export default new ContainerModule((bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind) => {
bindOutputPreferences(bind);
bind(OutputWidget).toSelf();
bind(OutputChannelManager).toSelf().inSingletonScope();
bind(WidgetFactory).toDynamicValue(context => ({
id: OUTPUT_WIDGET_KIND,
createWidget: () => context.container.get(OutputWidget)
}));
bindViewContribution(bind, OutputContribution);
bind(OutputToolbarContribution).toSelf().inSingletonScope();
bind(TabBarToolbarContribution).toService(OutputToolbarContribution);
});
onStart(app: FrontendApplication): MaybePromise {
ctx.container.get(HostedPluginSupport).onStart(ctx.container);
}
}));
bind(HostedPluginServer).toDynamicValue(ctx => {
const connection = ctx.container.get(WebSocketConnectionProvider);
const hostedWatcher = ctx.container.get(HostedPluginWatcher);
return connection.createProxy(hostedServicePath, hostedWatcher.getHostedPluginClient());
}).inSingletonScope();
bind(PluginPathsService).toDynamicValue(ctx => {
const connection = ctx.container.get(WebSocketConnectionProvider);
return connection.createProxy(pluginPathsServicePath);
}).inSingletonScope();
bindViewContribution(bind, PluginFrontendViewContribution);
bind(PluginWidget).toSelf();
bind(WidgetFactory).toDynamicValue(ctx => ({
id: PluginFrontendViewContribution.PLUGINS_WIDGET_FACTORY_ID,
createWidget: () => ctx.container.get(PluginWidget)
}));
bind(PluginExtDeployCommandService).toSelf().inSingletonScope();
bind(PluginServer).toDynamicValue(ctx => {
const provider = ctx.container.get(WebSocketConnectionProvider);
return provider.createProxy(pluginServerJsonRpcPath);
}).inSingletonScope();
bind(ViewContextKeyService).toSelf().inSingletonScope();
bind(PluginTreeViewNodeLabelProvider).toSelf().inSingletonScope();
export default new ContainerModule(bind => {
bind(CurrentEditorAccess).toSelf().inSingletonScope();
bindContributionProvider(bind, CallHierarchyService);
bind(CallHierarchyServiceProvider).to(CallHierarchyServiceProvider).inSingletonScope();
bindViewContribution(bind, CallHierarchyContribution);
bind(WidgetFactory).toDynamicValue(context => ({
id: CALLHIERARCHY_ID,
createWidget: () => createHierarchyTreeWidget(context.container)
}));
});
export default new ContainerModule(bind => {
bindProblemPreferences(bind);
bind(ProblemManager).toSelf().inSingletonScope();
bind(ProblemWidget).toDynamicValue(ctx =>
createProblemWidget(ctx.container)
);
bind(WidgetFactory).toDynamicValue(context => ({
id: PROBLEMS_WIDGET_ID,
createWidget: () => context.container.get(ProblemWidget)
}));
bind(ApplicationShellLayoutMigration).to(ProblemLayoutVersion3Migration).inSingletonScope();
bindViewContribution(bind, ProblemContribution);
bind(FrontendApplicationContribution).toService(ProblemContribution);
bind(TabBarToolbarContribution).toService(ProblemContribution);
bind(ProblemDecorator).toSelf().inSingletonScope();
bind(NavigatorTreeDecorator).toService(ProblemDecorator);
bind(ProblemTabBarDecorator).toSelf().inSingletonScope();
bind(TabBarDecorator).toService(ProblemTabBarDecorator);
bind(MarkerTreeLabelProvider).toSelf().inSingletonScope();
bind(LabelProviderContribution).toService(MarkerTreeLabelProvider);
});
export default new ContainerModule(bind => {
bind(ExtensionServer).toDynamicValue(ctx => {
const provider = ctx.container.get(WebSocketConnectionProvider);
return provider.createProxy(extensionPath);
}).inSingletonScope();
bind(ExtensionManager).toSelf().inSingletonScope();
bindViewContribution(bind, ExtensionContribution);
bind(ExtensionWidget).toSelf();
bind(WidgetFactory).toDynamicValue(ctx => ({
id: EXTENSIONS_WIDGET_FACTORY_ID,
createWidget: () => ctx.container.get(ExtensionWidget)
}));
bind(ExtensionWidgetFactory).toSelf().inSingletonScope();
bind(WidgetFactory).toService(ExtensionWidgetFactory);
bind(ExtensionOpenHandler).toSelf().inSingletonScope();
bind(OpenHandler).toService(ExtensionOpenHandler);
});
export function bindGitDiffModule(bind: interfaces.Bind): void {
bind(GitDiffWidget).toSelf();
bind(WidgetFactory).toDynamicValue(ctx => ({
id: GIT_DIFF,
createWidget: () => ctx.container.get(GitDiffWidget)
}));
bindViewContribution(bind, GitDiffContribution);
bind(TabBarToolbarContribution).toService(GitDiffContribution);
}
id: SCM_VIEW_CONTAINER_ID,
progressLocationId: 'scm'
});
viewContainer.setTitleOptions(SCM_VIEW_CONTAINER_TITLE_OPTIONS);
const widget = await container.get(WidgetManager).getOrCreateWidget(SCM_WIDGET_FACTORY_ID);
viewContainer.addWidget(widget, {
canHide: false,
initiallyCollapsed: false
});
return viewContainer;
}
})).inSingletonScope();
bind(ApplicationShellLayoutMigration).to(ScmLayoutVersion3Migration).inSingletonScope();
bind(ScmQuickOpenService).toSelf().inSingletonScope();
bindViewContribution(bind, ScmContribution);
bind(FrontendApplicationContribution).toService(ScmContribution);
bind(ColorContribution).toService(ScmContribution);
bind(NavigatorTreeDecorator).to(ScmNavigatorDecorator).inSingletonScope();
bind(ScmDecorationsService).toSelf().inSingletonScope();
bind(ScmAvatarService).toSelf().inSingletonScope();
bindDirtyDiff(bind);
});
ctx.container.get(HostedPluginSupport).checkAndLoadPlugin(ctx.container);
}
}));
bind(HostedPluginServer).toDynamicValue(ctx => {
const connection = ctx.container.get(WebSocketConnectionProvider);
const hostedWatcher = ctx.container.get(HostedPluginWatcher);
return connection.createProxy(hostedServicePath, hostedWatcher.getHostedPluginClient());
}).inSingletonScope();
bind(PluginPathsService).toDynamicValue(ctx => {
const connection = ctx.container.get(WebSocketConnectionProvider);
return connection.createProxy(pluginPathsServicePath);
}).inSingletonScope();
bind(StoragePathService).toSelf().inSingletonScope();
bindViewContribution(bind, PluginFrontendViewContribution);
bind(PluginWidget).toSelf();
bind(WidgetFactory).toDynamicValue(ctx => ({
id: PluginFrontendViewContribution.PLUGINS_WIDGET_FACTORY_ID,
createWidget: () => ctx.container.get(PluginWidget)
}));
bind(PluginExtDeployCommandService).toSelf().inSingletonScope();
bind(PluginServer).toDynamicValue(ctx => {
const provider = ctx.container.get(WebSocketConnectionProvider);
return provider.createProxy(pluginServerJsonRpcPath);
}).inSingletonScope();
bind(ViewRegistry).toSelf().inSingletonScope();
bind(MenusContributionPointHandler).toSelf().inSingletonScope();