提交 b208b7f3 编写于 作者: J Joao Moreno

put context view inside workbench

fixes #54030
上级 9433b67e
...@@ -16,7 +16,6 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; ...@@ -16,7 +16,6 @@ import { toErrorMessage } from 'vs/base/common/errorMessage';
import product from 'vs/platform/node/product'; import product from 'vs/platform/node/product';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import pkg from 'vs/platform/node/package'; import pkg from 'vs/platform/node/package';
import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService';
import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench'; import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { NullTelemetryService, configurationTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; import { NullTelemetryService, configurationTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
...@@ -46,7 +45,6 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; ...@@ -46,7 +45,6 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { ILifecycleService, LifecyclePhase, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { ILifecycleService, LifecyclePhase, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle';
import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IMarkerService } from 'vs/platform/markers/common/markers';
import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IEnvironmentService } from 'vs/platform/environment/common/environment';
...@@ -120,7 +118,6 @@ export class WorkbenchShell extends Disposable { ...@@ -120,7 +118,6 @@ export class WorkbenchShell extends Disposable {
private storageService: IStorageService; private storageService: IStorageService;
private environmentService: IEnvironmentService; private environmentService: IEnvironmentService;
private logService: ILogService; private logService: ILogService;
private contextViewService: ContextViewService;
private configurationService: IConfigurationService; private configurationService: IConfigurationService;
private contextService: IWorkspaceContextService; private contextService: IWorkspaceContextService;
private telemetryService: ITelemetryService; private telemetryService: ITelemetryService;
...@@ -409,9 +406,6 @@ export class WorkbenchShell extends Disposable { ...@@ -409,9 +406,6 @@ export class WorkbenchShell extends Disposable {
serviceCollection.set(ICommandService, new SyncDescriptor(CommandService)); serviceCollection.set(ICommandService, new SyncDescriptor(CommandService));
this.contextViewService = instantiationService.createInstance(ContextViewService, this.container);
serviceCollection.set(IContextViewService, this.contextViewService);
serviceCollection.set(IMarkerService, new SyncDescriptor(MarkerService)); serviceCollection.set(IMarkerService, new SyncDescriptor(MarkerService));
serviceCollection.set(IModeService, new SyncDescriptor(WorkbenchModeServiceImpl)); serviceCollection.set(IModeService, new SyncDescriptor(WorkbenchModeServiceImpl));
...@@ -507,7 +501,6 @@ export class WorkbenchShell extends Disposable { ...@@ -507,7 +501,6 @@ export class WorkbenchShell extends Disposable {
} }
private layout(): void { private layout(): void {
this.contextViewService.layout();
this.workbench.layout(); this.workbench.layout();
} }
......
...@@ -199,6 +199,7 @@ export class Workbench extends Disposable implements IPartService { ...@@ -199,6 +199,7 @@ export class Workbench extends Disposable implements IPartService {
private editorService: EditorService; private editorService: EditorService;
private editorGroupService: IEditorGroupsService; private editorGroupService: IEditorGroupsService;
private viewletService: IViewletService; private viewletService: IViewletService;
private contextViewService: ContextViewService;
private contextKeyService: IContextKeyService; private contextKeyService: IContextKeyService;
private keybindingService: IKeybindingService; private keybindingService: IKeybindingService;
private backupFileService: IBackupFileService; private backupFileService: IBackupFileService;
...@@ -248,7 +249,6 @@ export class Workbench extends Disposable implements IPartService { ...@@ -248,7 +249,6 @@ export class Workbench extends Disposable implements IPartService {
@IEnvironmentService private environmentService: IEnvironmentService, @IEnvironmentService private environmentService: IEnvironmentService,
@IWindowService private windowService: IWindowService, @IWindowService private windowService: IWindowService,
@INotificationService private notificationService: NotificationService, @INotificationService private notificationService: NotificationService,
@IContextViewService private contextViewService: ContextViewService,
@ITelemetryService private telemetryService: TelemetryService @ITelemetryService private telemetryService: TelemetryService
) { ) {
super(); super();
...@@ -352,6 +352,10 @@ export class Workbench extends Disposable implements IPartService { ...@@ -352,6 +352,10 @@ export class Workbench extends Disposable implements IPartService {
// List // List
serviceCollection.set(IListService, this.instantiationService.createInstance(ListService)); serviceCollection.set(IListService, this.instantiationService.createInstance(ListService));
// Context view service
this.contextViewService = this.instantiationService.createInstance(ContextViewService, this.workbench.getHTMLElement());
serviceCollection.set(IContextViewService, this.contextViewService);
// Use themable context menus when custom titlebar is enabled to match custom menubar // Use themable context menus when custom titlebar is enabled to match custom menubar
if (!isMacintosh && this.getCustomTitleBarStyle() === 'custom') { if (!isMacintosh && this.getCustomTitleBarStyle() === 'custom') {
serviceCollection.set(IContextMenuService, new SyncDescriptor(HTMLContextMenuService, null, this.telemetryService, this.notificationService, this.contextViewService)); serviceCollection.set(IContextMenuService, new SyncDescriptor(HTMLContextMenuService, null, this.telemetryService, this.notificationService, this.contextViewService));
...@@ -1283,6 +1287,8 @@ export class Workbench extends Disposable implements IPartService { ...@@ -1283,6 +1287,8 @@ export class Workbench extends Disposable implements IPartService {
} }
layout(options?: ILayoutOptions): void { layout(options?: ILayoutOptions): void {
this.contextViewService.layout();
if (this.workbenchStarted && !this.workbenchShutdown) { if (this.workbenchStarted && !this.workbenchShutdown) {
this.workbenchLayout.layout(options); this.workbenchLayout.layout(options);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册