提交 9ce4ebbf 编写于 作者: B Benjamin Pasero

debt - fold electron environment and native environment into one

上级 44c76bd3
...@@ -16,7 +16,7 @@ export interface INativeWindowConfiguration extends IWindowConfiguration { ...@@ -16,7 +16,7 @@ export interface INativeWindowConfiguration extends IWindowConfiguration {
mainPid: number; mainPid: number;
windowId: number; windowId: number;
machineId: string; // NOTE: This is undefined in the web, the telemetry service directly resolves this. machineId: string;
appRoot: string; appRoot: string;
execPath: string; execPath: string;
......
...@@ -9,8 +9,9 @@ import { URI } from 'vs/base/common/uri'; ...@@ -9,8 +9,9 @@ import { URI } from 'vs/base/common/uri';
import * as nls from 'vs/nls'; import * as nls from 'vs/nls';
import { IElectronService } from 'vs/platform/electron/node/electron'; import { IElectronService } from 'vs/platform/electron/node/electron';
import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IFileService } from 'vs/platform/files/common/files'; import { IFileService } from 'vs/platform/files/common/files';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export class OpenLogsFolderAction extends Action { export class OpenLogsFolderAction extends Action {
...@@ -35,7 +36,7 @@ export class OpenExtensionLogsFolderAction extends Action { ...@@ -35,7 +36,7 @@ export class OpenExtensionLogsFolderAction extends Action {
static readonly LABEL = nls.localize('openExtensionLogsFolder', "Open Extension Logs Folder"); static readonly LABEL = nls.localize('openExtensionLogsFolder', "Open Extension Logs Folder");
constructor(id: string, label: string, constructor(id: string, label: string,
@IElectronEnvironmentService private readonly electronEnvironmentSerice: IElectronEnvironmentService, @IWorkbenchEnvironmentService private readonly environmentSerice: INativeWorkbenchEnvironmentService,
@IFileService private readonly fileService: IFileService, @IFileService private readonly fileService: IFileService,
@IElectronService private readonly electronService: IElectronService @IElectronService private readonly electronService: IElectronService
) { ) {
...@@ -43,7 +44,7 @@ export class OpenExtensionLogsFolderAction extends Action { ...@@ -43,7 +44,7 @@ export class OpenExtensionLogsFolderAction extends Action {
} }
async run(): Promise<void> { async run(): Promise<void> {
const folderStat = await this.fileService.resolve(this.electronEnvironmentSerice.extHostLogsPath); const folderStat = await this.fileService.resolve(this.environmentSerice.extHostLogsPath);
if (folderStat.children && folderStat.children[0]) { if (folderStat.children && folderStat.children[0]) {
return this.electronService.showItemInFolder(folderStat.children[0].resource.fsPath); return this.electronService.showItemInFolder(folderStat.children[0].resource.fsPath);
} }
......
...@@ -24,7 +24,7 @@ import { URI } from 'vs/base/common/uri'; ...@@ -24,7 +24,7 @@ import { URI } from 'vs/base/common/uri';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import * as perf from 'vs/base/common/performance'; import * as perf from 'vs/base/common/performance';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { assertIsDefined } from 'vs/base/common/types'; import { assertIsDefined } from 'vs/base/common/types';
class PartsSplash { class PartsSplash {
...@@ -41,8 +41,7 @@ class PartsSplash { ...@@ -41,8 +41,7 @@ class PartsSplash {
@IThemeService private readonly _themeService: IThemeService, @IThemeService private readonly _themeService: IThemeService,
@IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService, @IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService,
@ITextFileService private readonly _textFileService: ITextFileService, @ITextFileService private readonly _textFileService: ITextFileService,
@IWorkbenchEnvironmentService private readonly _envService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService private readonly _envService: INativeWorkbenchEnvironmentService,
@IElectronEnvironmentService private readonly _electronEnvService: IElectronEnvironmentService,
@ILifecycleService lifecycleService: ILifecycleService, @ILifecycleService lifecycleService: ILifecycleService,
@IEditorGroupsService editorGroupsService: IEditorGroupsService, @IEditorGroupsService editorGroupsService: IEditorGroupsService,
@IConfigurationService configService: IConfigurationService, @IConfigurationService configService: IConfigurationService,
...@@ -113,7 +112,7 @@ class PartsSplash { ...@@ -113,7 +112,7 @@ class PartsSplash {
// the color needs to be in hex // the color needs to be in hex
const backgroundColor = this._themeService.getColorTheme().getColor(editorBackground) || themes.WORKBENCH_BACKGROUND(this._themeService.getColorTheme()); const backgroundColor = this._themeService.getColorTheme().getColor(editorBackground) || themes.WORKBENCH_BACKGROUND(this._themeService.getColorTheme());
const payload = JSON.stringify({ baseTheme, background: Color.Format.CSS.formatHex(backgroundColor) }); const payload = JSON.stringify({ baseTheme, background: Color.Format.CSS.formatHex(backgroundColor) });
ipc.send('vscode:changeColorTheme', this._electronEnvService.windowId, payload); ipc.send('vscode:changeColorTheme', this._envService.configuration.windowId, payload);
} }
} }
......
...@@ -18,7 +18,8 @@ import { ICommandHandler } from 'vs/platform/commands/common/commands'; ...@@ -18,7 +18,8 @@ import { ICommandHandler } from 'vs/platform/commands/common/commands';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IElectronService } from 'vs/platform/electron/node/electron'; import { IElectronService } from 'vs/platform/electron/node/electron';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
export class CloseCurrentWindowAction extends Action { export class CloseCurrentWindowAction extends Action {
...@@ -167,7 +168,7 @@ export abstract class BaseSwitchWindow extends Action { ...@@ -167,7 +168,7 @@ export abstract class BaseSwitchWindow extends Action {
constructor( constructor(
id: string, id: string,
label: string, label: string,
private electronEnvironmentService: IElectronEnvironmentService, private environmentService: INativeWorkbenchEnvironmentService,
private quickInputService: IQuickInputService, private quickInputService: IQuickInputService,
private keybindingService: IKeybindingService, private keybindingService: IKeybindingService,
private modelService: IModelService, private modelService: IModelService,
...@@ -180,7 +181,7 @@ export abstract class BaseSwitchWindow extends Action { ...@@ -180,7 +181,7 @@ export abstract class BaseSwitchWindow extends Action {
protected abstract isQuickNavigate(): boolean; protected abstract isQuickNavigate(): boolean;
async run(): Promise<void> { async run(): Promise<void> {
const currentWindowId = this.electronEnvironmentService.windowId; const currentWindowId = this.environmentService.configuration.windowId;
const windows = await this.electronService.getWindows(); const windows = await this.electronService.getWindows();
const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window to switch to"); const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window to switch to");
...@@ -222,14 +223,14 @@ export class SwitchWindow extends BaseSwitchWindow { ...@@ -222,14 +223,14 @@ export class SwitchWindow extends BaseSwitchWindow {
constructor( constructor(
id: string, id: string,
label: string, label: string,
@IElectronEnvironmentService electronEnvironmentService: IElectronEnvironmentService, @IWorkbenchEnvironmentService environmentService: INativeWorkbenchEnvironmentService,
@IQuickInputService quickInputService: IQuickInputService, @IQuickInputService quickInputService: IQuickInputService,
@IKeybindingService keybindingService: IKeybindingService, @IKeybindingService keybindingService: IKeybindingService,
@IModelService modelService: IModelService, @IModelService modelService: IModelService,
@IModeService modeService: IModeService, @IModeService modeService: IModeService,
@IElectronService electronService: IElectronService @IElectronService electronService: IElectronService
) { ) {
super(id, label, electronEnvironmentService, quickInputService, keybindingService, modelService, modeService, electronService); super(id, label, environmentService, quickInputService, keybindingService, modelService, modeService, electronService);
} }
protected isQuickNavigate(): boolean { protected isQuickNavigate(): boolean {
...@@ -245,14 +246,14 @@ export class QuickSwitchWindow extends BaseSwitchWindow { ...@@ -245,14 +246,14 @@ export class QuickSwitchWindow extends BaseSwitchWindow {
constructor( constructor(
id: string, id: string,
label: string, label: string,
@IElectronEnvironmentService electronEnvironmentService: IElectronEnvironmentService, @IWorkbenchEnvironmentService environmentService: INativeWorkbenchEnvironmentService,
@IQuickInputService quickInputService: IQuickInputService, @IQuickInputService quickInputService: IQuickInputService,
@IKeybindingService keybindingService: IKeybindingService, @IKeybindingService keybindingService: IKeybindingService,
@IModelService modelService: IModelService, @IModelService modelService: IModelService,
@IModeService modeService: IModeService, @IModeService modeService: IModeService,
@IElectronService electronService: IElectronService @IElectronService electronService: IElectronService
) { ) {
super(id, label, electronEnvironmentService, quickInputService, keybindingService, modelService, modeService, electronService); super(id, label, environmentService, quickInputService, keybindingService, modelService, modeService, electronService);
} }
protected isQuickNavigate(): boolean { protected isQuickNavigate(): boolean {
......
...@@ -51,7 +51,6 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file ...@@ -51,7 +51,6 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file
import { basename } from 'vs/base/common/resources'; import { basename } from 'vs/base/common/resources';
import { IProductService } from 'vs/platform/product/common/productService'; import { IProductService } from 'vs/platform/product/common/productService';
import product from 'vs/platform/product/common/product'; import product from 'vs/platform/product/common/product';
import { ElectronEnvironmentService, IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
class DesktopMain extends Disposable { class DesktopMain extends Disposable {
...@@ -60,7 +59,7 @@ class DesktopMain extends Disposable { ...@@ -60,7 +59,7 @@ class DesktopMain extends Disposable {
constructor(private configuration: INativeWindowConfiguration) { constructor(private configuration: INativeWindowConfiguration) {
super(); super();
this.environmentService = new NativeWorkbenchEnvironmentService(configuration, configuration.execPath, configuration.windowId); this.environmentService = new NativeWorkbenchEnvironmentService(configuration, configuration.execPath);
this.init(); this.init();
} }
...@@ -180,11 +179,6 @@ class DesktopMain extends Disposable { ...@@ -180,11 +179,6 @@ class DesktopMain extends Disposable {
// Environment // Environment
serviceCollection.set(IWorkbenchEnvironmentService, this.environmentService); serviceCollection.set(IWorkbenchEnvironmentService, this.environmentService);
serviceCollection.set(IElectronEnvironmentService, new ElectronEnvironmentService(
this.configuration.windowId,
this.environmentService.sharedIPCHandle,
this.environmentService
));
// Product // Product
serviceCollection.set(IProductService, { _serviceBrand: undefined, ...product }); serviceCollection.set(IProductService, { _serviceBrand: undefined, ...product });
......
...@@ -58,7 +58,6 @@ import { getBaseLabel } from 'vs/base/common/labels'; ...@@ -58,7 +58,6 @@ import { getBaseLabel } from 'vs/base/common/labels';
import { ITunnelService, extractLocalHostUriMetaDataForPortMapping } from 'vs/platform/remote/common/tunnel'; import { ITunnelService, extractLocalHostUriMetaDataForPortMapping } from 'vs/platform/remote/common/tunnel';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { IHostService } from 'vs/workbench/services/host/browser/host'; import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
import { IWorkingCopyService, WorkingCopyCapabilities } from 'vs/workbench/services/workingCopy/common/workingCopyService'; import { IWorkingCopyService, WorkingCopyCapabilities } from 'vs/workbench/services/workingCopy/common/workingCopyService';
import { AutoSaveMode, IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService'; import { AutoSaveMode, IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
import { Event } from 'vs/base/common/event'; import { Event } from 'vs/base/common/event';
...@@ -69,7 +68,6 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; ...@@ -69,7 +68,6 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IProductService } from 'vs/platform/product/common/productService'; import { IProductService } from 'vs/platform/product/common/productService';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
export class ElectronWindow extends Disposable { export class ElectronWindow extends Disposable {
private touchBarMenu: IMenu | undefined; private touchBarMenu: IMenu | undefined;
...@@ -109,7 +107,6 @@ export class ElectronWindow extends Disposable { ...@@ -109,7 +107,6 @@ export class ElectronWindow extends Disposable {
@IElectronService private readonly electronService: IElectronService, @IElectronService private readonly electronService: IElectronService,
@ITunnelService private readonly tunnelService: ITunnelService, @ITunnelService private readonly tunnelService: ITunnelService,
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService, @IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
@IElectronEnvironmentService private readonly electronEnvironmentService: IElectronEnvironmentService,
@IWorkingCopyService private readonly workingCopyService: IWorkingCopyService, @IWorkingCopyService private readonly workingCopyService: IWorkingCopyService,
@IFilesConfigurationService private readonly filesConfigurationService: IFilesConfigurationService @IFilesConfigurationService private readonly filesConfigurationService: IFilesConfigurationService
) { ) {
...@@ -287,8 +284,8 @@ export class ElectronWindow extends Disposable { ...@@ -287,8 +284,8 @@ export class ElectronWindow extends Disposable {
// Detect minimize / maximize // Detect minimize / maximize
this._register(Event.any( this._register(Event.any(
Event.map(Event.filter(this.electronService.onWindowMaximize, id => id === this.electronEnvironmentService.windowId), () => true), Event.map(Event.filter(this.electronService.onWindowMaximize, id => id === this.environmentService.configuration.windowId), () => true),
Event.map(Event.filter(this.electronService.onWindowUnmaximize, id => id === this.electronEnvironmentService.windowId), () => false) Event.map(Event.filter(this.electronService.onWindowUnmaximize, id => id === this.environmentService.configuration.windowId), () => false)
)(e => this.onDidChangeMaximized(e))); )(e => this.onDidChangeMaximized(e)));
this.onDidChangeMaximized(this.environmentService.configuration.maximized ?? false); this.onDidChangeMaximized(this.environmentService.configuration.maximized ?? false);
...@@ -402,7 +399,7 @@ export class ElectronWindow extends Disposable { ...@@ -402,7 +399,7 @@ export class ElectronWindow extends Disposable {
this.setupOpenHandlers(); this.setupOpenHandlers();
// Emit event when vscode is ready // Emit event when vscode is ready
this.lifecycleService.when(LifecyclePhase.Ready).then(() => ipc.send('vscode:workbenchReady', this.electronEnvironmentService.windowId)); this.lifecycleService.when(LifecyclePhase.Ready).then(() => ipc.send('vscode:workbenchReady', this.environmentService.configuration.windowId));
// Integrity warning // Integrity warning
this.integrityService.isPure().then(res => this.titleService.updateProperties({ isPure: res.isPure })); this.integrityService.isPure().then(res => this.titleService.updateProperties({ isPure: res.isPure }));
...@@ -704,11 +701,10 @@ class NativeMenubarControl extends MenubarControl { ...@@ -704,11 +701,10 @@ class NativeMenubarControl extends MenubarControl {
@IStorageService storageService: IStorageService, @IStorageService storageService: IStorageService,
@INotificationService notificationService: INotificationService, @INotificationService notificationService: INotificationService,
@IPreferencesService preferencesService: IPreferencesService, @IPreferencesService preferencesService: IPreferencesService,
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService protected readonly environmentService: INativeWorkbenchEnvironmentService,
@IAccessibilityService accessibilityService: IAccessibilityService, @IAccessibilityService accessibilityService: IAccessibilityService,
@IMenubarService private readonly menubarService: IMenubarService, @IMenubarService private readonly menubarService: IMenubarService,
@IHostService hostService: IHostService, @IHostService hostService: IHostService,
@IElectronEnvironmentService private readonly electronEnvironmentService: IElectronEnvironmentService
) { ) {
super( super(
menuService, menuService,
...@@ -757,7 +753,7 @@ class NativeMenubarControl extends MenubarControl { ...@@ -757,7 +753,7 @@ class NativeMenubarControl extends MenubarControl {
// Send menus to main process to be rendered by Electron // Send menus to main process to be rendered by Electron
const menubarData = { menus: {}, keybindings: {} }; const menubarData = { menus: {}, keybindings: {} };
if (this.getMenubarMenus(menubarData)) { if (this.getMenubarMenus(menubarData)) {
this.menubarService.updateMenubar(this.electronEnvironmentService.windowId, menubarData); this.menubarService.updateMenubar(this.environmentService.configuration.windowId, menubarData);
} }
} }
......
...@@ -48,7 +48,7 @@ const untitledBackupPath = path.join(workspaceBackupPath, 'untitled', hashPath(u ...@@ -48,7 +48,7 @@ const untitledBackupPath = path.join(workspaceBackupPath, 'untitled', hashPath(u
class TestBackupEnvironmentService extends NativeWorkbenchEnvironmentService { class TestBackupEnvironmentService extends NativeWorkbenchEnvironmentService {
constructor(backupPath: string) { constructor(backupPath: string) {
super({ ...TestWindowConfiguration, backupPath, 'user-data-dir': userdataDir }, TestWindowConfiguration.execPath, TestWindowConfiguration.windowId); super({ ...TestWindowConfiguration, backupPath, 'user-data-dir': userdataDir }, TestWindowConfiguration.execPath);
} }
} }
......
...@@ -45,7 +45,7 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file ...@@ -45,7 +45,7 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file
class TestEnvironmentService extends NativeWorkbenchEnvironmentService { class TestEnvironmentService extends NativeWorkbenchEnvironmentService {
constructor(private _appSettingsHome: URI) { constructor(private _appSettingsHome: URI) {
super(TestWindowConfiguration, TestWindowConfiguration.execPath, TestWindowConfiguration.windowId); super(TestWindowConfiguration, TestWindowConfiguration.execPath);
} }
get appSettingsHome() { return this._appSettingsHome; } get appSettingsHome() { return this._appSettingsHome; }
......
...@@ -51,7 +51,7 @@ import { timeout } from 'vs/base/common/async'; ...@@ -51,7 +51,7 @@ import { timeout } from 'vs/base/common/async';
class TestEnvironmentService extends NativeWorkbenchEnvironmentService { class TestEnvironmentService extends NativeWorkbenchEnvironmentService {
constructor(private _appSettingsHome: URI) { constructor(private _appSettingsHome: URI) {
super(TestWindowConfiguration, TestWindowConfiguration.execPath, TestWindowConfiguration.windowId); super(TestWindowConfiguration, TestWindowConfiguration.execPath);
} }
get appSettingsHome() { return this._appSettingsHome; } get appSettingsHome() { return this._appSettingsHome; }
......
...@@ -623,6 +623,6 @@ class MockInputsConfigurationService extends TestConfigurationService { ...@@ -623,6 +623,6 @@ class MockInputsConfigurationService extends TestConfigurationService {
class MockWorkbenchEnvironmentService extends NativeWorkbenchEnvironmentService { class MockWorkbenchEnvironmentService extends NativeWorkbenchEnvironmentService {
constructor(public userEnv: platform.IProcessEnvironment) { constructor(public userEnv: platform.IProcessEnvironment) {
super({ ...TestWindowConfiguration, userEnv }, TestWindowConfiguration.execPath, TestWindowConfiguration.windowId); super({ ...TestWindowConfiguration, userEnv }, TestWindowConfiguration.execPath);
} }
} }
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { URI } from 'vs/base/common/uri';
import { memoize } from 'vs/base/common/decorators';
import { join } from 'vs/base/common/path';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
export const IElectronEnvironmentService = createDecorator<IElectronEnvironmentService>('electronEnvironmentService');
export interface IElectronEnvironmentService {
_serviceBrand: undefined;
readonly windowId: number;
readonly sharedIPCHandle: string;
readonly extHostLogsPath: URI;
}
export class ElectronEnvironmentService implements IElectronEnvironmentService {
_serviceBrand: undefined;
constructor(
public readonly windowId: number,
public readonly sharedIPCHandle: string,
private readonly environmentService: IEnvironmentService
) { }
@memoize
get extHostLogsPath(): URI { return URI.file(join(this.environmentService.logsPath, `exthost${this.windowId}`)); }
}
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
import { IElectronService } from 'vs/platform/electron/node/electron'; import { IElectronService } from 'vs/platform/electron/node/electron';
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { createChannelSender } from 'vs/base/parts/ipc/node/ipc'; import { createChannelSender } from 'vs/base/parts/ipc/node/ipc';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
export class ElectronService { export class ElectronService {
...@@ -15,9 +16,9 @@ export class ElectronService { ...@@ -15,9 +16,9 @@ export class ElectronService {
constructor( constructor(
@IMainProcessService mainProcessService: IMainProcessService, @IMainProcessService mainProcessService: IMainProcessService,
@IElectronEnvironmentService electronEnvironmentService: IElectronEnvironmentService @IWorkbenchEnvironmentService environmentService: INativeWorkbenchEnvironmentService
) { ) {
return createChannelSender<IElectronService>(mainProcessService.getChannel('electron'), { context: electronEnvironmentService.windowId }); return createChannelSender<IElectronService>(mainProcessService.getChannel('electron'), { context: environmentService.configuration.windowId });
} }
} }
......
...@@ -17,9 +17,12 @@ export interface INativeWorkbenchEnvironmentService extends IWorkbenchEnvironmen ...@@ -17,9 +17,12 @@ export interface INativeWorkbenchEnvironmentService extends IWorkbenchEnvironmen
readonly configuration: INativeWindowConfiguration; readonly configuration: INativeWindowConfiguration;
log?: string; readonly disableCrashReporter: boolean;
cliPath: string;
disableCrashReporter: boolean; readonly cliPath: string;
readonly log?: string;
readonly extHostLogsPath: URI;
} }
export class NativeWorkbenchEnvironmentService extends EnvironmentService implements INativeWorkbenchEnvironmentService { export class NativeWorkbenchEnvironmentService extends EnvironmentService implements INativeWorkbenchEnvironmentService {
...@@ -43,12 +46,14 @@ export class NativeWorkbenchEnvironmentService extends EnvironmentService implem ...@@ -43,12 +46,14 @@ export class NativeWorkbenchEnvironmentService extends EnvironmentService implem
get userRoamingDataHome(): URI { return this.appSettingsHome.with({ scheme: Schemas.userData }); } get userRoamingDataHome(): URI { return this.appSettingsHome.with({ scheme: Schemas.userData }); }
@memoize @memoize
get logFile(): URI { return URI.file(join(this.logsPath, `renderer${this.windowId}.log`)); } get logFile(): URI { return URI.file(join(this.logsPath, `renderer${this.configuration.windowId}.log`)); }
@memoize
get extHostLogsPath(): URI { return URI.file(join(this.logsPath, `exthost${this.configuration.windowId}`)); }
constructor( constructor(
readonly configuration: INativeWindowConfiguration, readonly configuration: INativeWindowConfiguration,
execPath: string, execPath: string
private readonly windowId: number
) { ) {
super(configuration, execPath); super(configuration, execPath);
......
...@@ -35,7 +35,7 @@ import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints' ...@@ -35,7 +35,7 @@ import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints'
import { flatten } from 'vs/base/common/arrays'; import { flatten } from 'vs/base/common/arrays';
import { IStaticExtensionsService } from 'vs/workbench/services/extensions/common/staticExtensions'; import { IStaticExtensionsService } from 'vs/workbench/services/extensions/common/staticExtensions';
import { IElectronService } from 'vs/platform/electron/node/electron'; import { IElectronService } from 'vs/platform/electron/node/electron';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { IRemoteExplorerService } from 'vs/workbench/services/remote/common/remoteExplorerService'; import { IRemoteExplorerService } from 'vs/workbench/services/remote/common/remoteExplorerService';
import { Action } from 'vs/base/common/actions'; import { Action } from 'vs/base/common/actions';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
...@@ -60,7 +60,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten ...@@ -60,7 +60,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
constructor( constructor(
@IInstantiationService instantiationService: IInstantiationService, @IInstantiationService instantiationService: IInstantiationService,
@INotificationService notificationService: INotificationService, @INotificationService notificationService: INotificationService,
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService protected readonly _environmentService: INativeWorkbenchEnvironmentService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IWorkbenchExtensionEnablementService extensionEnablementService: IWorkbenchExtensionEnablementService, @IWorkbenchExtensionEnablementService extensionEnablementService: IWorkbenchExtensionEnablementService,
@IFileService fileService: IFileService, @IFileService fileService: IFileService,
...@@ -73,14 +73,13 @@ export class ExtensionService extends AbstractExtensionService implements IExten ...@@ -73,14 +73,13 @@ export class ExtensionService extends AbstractExtensionService implements IExten
@IStaticExtensionsService private readonly _staticExtensions: IStaticExtensionsService, @IStaticExtensionsService private readonly _staticExtensions: IStaticExtensionsService,
@IElectronService private readonly _electronService: IElectronService, @IElectronService private readonly _electronService: IElectronService,
@IHostService private readonly _hostService: IHostService, @IHostService private readonly _hostService: IHostService,
@IElectronEnvironmentService private readonly _electronEnvironmentService: IElectronEnvironmentService,
@IRemoteExplorerService private readonly _remoteExplorerService: IRemoteExplorerService, @IRemoteExplorerService private readonly _remoteExplorerService: IRemoteExplorerService,
@IExtensionGalleryService private readonly _extensionGalleryService: IExtensionGalleryService, @IExtensionGalleryService private readonly _extensionGalleryService: IExtensionGalleryService,
) { ) {
super( super(
instantiationService, instantiationService,
notificationService, notificationService,
environmentService, _environmentService,
telemetryService, telemetryService,
extensionEnablementService, extensionEnablementService,
fileService, fileService,
...@@ -361,7 +360,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten ...@@ -361,7 +360,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
const result: ExtensionHostProcessManager[] = []; const result: ExtensionHostProcessManager[] = [];
const extHostProcessWorker = this._instantiationService.createInstance(ExtensionHostProcessWorker, autoStart, extensions, this._electronEnvironmentService.extHostLogsPath); const extHostProcessWorker = this._instantiationService.createInstance(ExtensionHostProcessWorker, autoStart, extensions, this._environmentService.extHostLogsPath);
const extHostProcessManager = this._instantiationService.createInstance(ExtensionHostProcessManager, true, extHostProcessWorker, null, initialActivationEvents); const extHostProcessManager = this._instantiationService.createInstance(ExtensionHostProcessManager, true, extHostProcessWorker, null, initialActivationEvents);
result.push(extHostProcessManager); result.push(extHostProcessManager);
......
...@@ -11,7 +11,7 @@ import { ILabelService } from 'vs/platform/label/common/label'; ...@@ -11,7 +11,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IWindowOpenable, IOpenWindowOptions, isFolderToOpen, isWorkspaceToOpen, IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows'; import { IWindowOpenable, IOpenWindowOptions, isFolderToOpen, isWorkspaceToOpen, IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows';
import { Disposable } from 'vs/base/common/lifecycle'; import { Disposable } from 'vs/base/common/lifecycle';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export class DesktopHostService extends Disposable implements IHostService { export class DesktopHostService extends Disposable implements IHostService {
...@@ -20,16 +20,15 @@ export class DesktopHostService extends Disposable implements IHostService { ...@@ -20,16 +20,15 @@ export class DesktopHostService extends Disposable implements IHostService {
constructor( constructor(
@IElectronService private readonly electronService: IElectronService, @IElectronService private readonly electronService: IElectronService,
@ILabelService private readonly labelService: ILabelService, @ILabelService private readonly labelService: ILabelService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService
@IElectronEnvironmentService private readonly electronEnvironmentService: IElectronEnvironmentService
) { ) {
super(); super();
} }
get onDidChangeFocus(): Event<boolean> { return this._onDidChangeFocus; } get onDidChangeFocus(): Event<boolean> { return this._onDidChangeFocus; }
private _onDidChangeFocus: Event<boolean> = Event.any( private _onDidChangeFocus: Event<boolean> = Event.any(
Event.map(Event.filter(this.electronService.onWindowFocus, id => id === this.electronEnvironmentService.windowId), () => this.hasFocus), Event.map(Event.filter(this.electronService.onWindowFocus, id => id === this.environmentService.configuration.windowId), () => this.hasFocus),
Event.map(Event.filter(this.electronService.onWindowBlur, id => id === this.electronEnvironmentService.windowId), () => this.hasFocus) Event.map(Event.filter(this.electronService.onWindowBlur, id => id === this.environmentService.configuration.windowId), () => this.hasFocus)
); );
get hasFocus(): boolean { get hasFocus(): boolean {
...@@ -43,7 +42,7 @@ export class DesktopHostService extends Disposable implements IHostService { ...@@ -43,7 +42,7 @@ export class DesktopHostService extends Disposable implements IHostService {
return false; return false;
} }
return activeWindowId === this.electronEnvironmentService.windowId; return activeWindowId === this.environmentService.configuration.windowId;
} }
openWindow(options?: IOpenEmptyWindowOptions): Promise<void>; openWindow(options?: IOpenEmptyWindowOptions): Promise<void>;
......
...@@ -58,7 +58,7 @@ import { UndoRedoService } from 'vs/platform/undoRedo/common/undoRedoService'; ...@@ -58,7 +58,7 @@ import { UndoRedoService } from 'vs/platform/undoRedo/common/undoRedoService';
class TestEnvironmentService extends NativeWorkbenchEnvironmentService { class TestEnvironmentService extends NativeWorkbenchEnvironmentService {
constructor(private _appSettingsHome: URI) { constructor(private _appSettingsHome: URI) {
super(TestWindowConfiguration, TestWindowConfiguration.execPath, TestWindowConfiguration.windowId); super(TestWindowConfiguration, TestWindowConfiguration.execPath);
} }
get appSettingsHome() { return this._appSettingsHome; } get appSettingsHome() { return this._appSettingsHome; }
......
...@@ -7,7 +7,6 @@ import { toErrorMessage } from 'vs/base/common/errorMessage'; ...@@ -7,7 +7,6 @@ import { toErrorMessage } from 'vs/base/common/errorMessage';
import { ShutdownReason, StartupKind, handleVetos, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { ShutdownReason, StartupKind, handleVetos, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
import { IStorageService, StorageScope, WillSaveStateReason } from 'vs/platform/storage/common/storage'; import { IStorageService, StorageScope, WillSaveStateReason } from 'vs/platform/storage/common/storage';
import { ipcRenderer as ipc } from 'electron'; import { ipcRenderer as ipc } from 'electron';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { INotificationService } from 'vs/platform/notification/common/notification'; import { INotificationService } from 'vs/platform/notification/common/notification';
import { onUnexpectedError } from 'vs/base/common/errors'; import { onUnexpectedError } from 'vs/base/common/errors';
...@@ -15,6 +14,8 @@ import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycle ...@@ -15,6 +14,8 @@ import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycle
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import Severity from 'vs/base/common/severity'; import Severity from 'vs/base/common/severity';
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export class NativeLifecycleService extends AbstractLifecycleService { export class NativeLifecycleService extends AbstractLifecycleService {
...@@ -26,7 +27,7 @@ export class NativeLifecycleService extends AbstractLifecycleService { ...@@ -26,7 +27,7 @@ export class NativeLifecycleService extends AbstractLifecycleService {
constructor( constructor(
@INotificationService private readonly notificationService: INotificationService, @INotificationService private readonly notificationService: INotificationService,
@IElectronEnvironmentService private readonly electronEnvironmentService: IElectronEnvironmentService, @IWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService,
@IStorageService readonly storageService: IStorageService, @IStorageService readonly storageService: IStorageService,
@ILogService readonly logService: ILogService @ILogService readonly logService: ILogService
) { ) {
...@@ -56,7 +57,7 @@ export class NativeLifecycleService extends AbstractLifecycleService { ...@@ -56,7 +57,7 @@ export class NativeLifecycleService extends AbstractLifecycleService {
} }
private registerListeners(): void { private registerListeners(): void {
const windowId = this.electronEnvironmentService.windowId; const windowId = this.environmentService.configuration.windowId;
// Main side indicates that window is about to unload, check for vetos // Main side indicates that window is about to unload, check for vetos
ipc.on('vscode:onBeforeUnload', (_event: unknown, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => { ipc.on('vscode:onBeforeUnload', (_event: unknown, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => {
......
...@@ -21,7 +21,7 @@ import { toLocalISOString } from 'vs/base/common/date'; ...@@ -21,7 +21,7 @@ import { toLocalISOString } from 'vs/base/common/date';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { Emitter, Event } from 'vs/base/common/event'; import { Emitter, Event } from 'vs/base/common/event';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
class OutputChannelBackedByFile extends AbstractFileOutputChannelModel implements IOutputChannelModel { class OutputChannelBackedByFile extends AbstractFileOutputChannelModel implements IOutputChannelModel {
...@@ -203,8 +203,7 @@ export class OutputChannelModelService extends AsbtractOutputChannelModelService ...@@ -203,8 +203,7 @@ export class OutputChannelModelService extends AsbtractOutputChannelModelService
constructor( constructor(
@IInstantiationService instantiationService: IInstantiationService, @IInstantiationService instantiationService: IInstantiationService,
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService,
@IElectronEnvironmentService private readonly electronEnvironmentService: IElectronEnvironmentService,
@IFileService private readonly fileService: IFileService @IFileService private readonly fileService: IFileService
) { ) {
super(instantiationService); super(instantiationService);
...@@ -218,7 +217,7 @@ export class OutputChannelModelService extends AsbtractOutputChannelModelService ...@@ -218,7 +217,7 @@ export class OutputChannelModelService extends AsbtractOutputChannelModelService
private _outputDir: Promise<URI> | null = null; private _outputDir: Promise<URI> | null = null;
private get outputDir(): Promise<URI> { private get outputDir(): Promise<URI> {
if (!this._outputDir) { if (!this._outputDir) {
const outputDir = URI.file(join(this.environmentService.logsPath, `output_${this.electronEnvironmentService.windowId}_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`)); const outputDir = URI.file(join(this.environmentService.logsPath, `output_${this.environmentService.configuration.windowId}_${toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')}`));
this._outputDir = this.fileService.createFolder(outputDir).then(() => outputDir); this._outputDir = this.fileService.createFolder(outputDir).then(() => outputDir);
} }
return this._outputDir; return this._outputDir;
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
import { Client } from 'vs/base/parts/ipc/common/ipc.net'; import { Client } from 'vs/base/parts/ipc/common/ipc.net';
import { connect } from 'vs/base/parts/ipc/node/ipc.net'; import { connect } from 'vs/base/parts/ipc/node/ipc.net';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
import { IChannel, IServerChannel, getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import { IChannel, IServerChannel, getDelayedChannel } from 'vs/base/parts/ipc/common/ipc';
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService'; import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export class SharedProcessService implements ISharedProcessService { export class SharedProcessService implements ISharedProcessService {
...@@ -20,12 +21,12 @@ export class SharedProcessService implements ISharedProcessService { ...@@ -20,12 +21,12 @@ export class SharedProcessService implements ISharedProcessService {
constructor( constructor(
@IMainProcessService mainProcessService: IMainProcessService, @IMainProcessService mainProcessService: IMainProcessService,
@IElectronEnvironmentService environmentService: IElectronEnvironmentService @IWorkbenchEnvironmentService environmentService: INativeWorkbenchEnvironmentService
) { ) {
this.sharedProcessMainChannel = mainProcessService.getChannel('sharedProcess'); this.sharedProcessMainChannel = mainProcessService.getChannel('sharedProcess');
this.withSharedProcessConnection = this.whenSharedProcessReady() this.withSharedProcessConnection = this.whenSharedProcessReady()
.then(() => connect(environmentService.sharedIPCHandle, `window:${environmentService.windowId}`)); .then(() => connect(environmentService.sharedIPCHandle, `window:${environmentService.configuration.windowId}`));
} }
whenSharedProcessReady(): Promise<void> { whenSharedProcessReady(): Promise<void> {
......
...@@ -11,9 +11,10 @@ import { URLService } from 'vs/platform/url/node/urlService'; ...@@ -11,9 +11,10 @@ import { URLService } from 'vs/platform/url/node/urlService';
import { IOpenerService, IOpener, matchesScheme } from 'vs/platform/opener/common/opener'; import { IOpenerService, IOpener, matchesScheme } from 'vs/platform/opener/common/opener';
import product from 'vs/platform/product/common/product'; import product from 'vs/platform/product/common/product';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
import { createChannelSender } from 'vs/base/parts/ipc/node/ipc'; import { createChannelSender } from 'vs/base/parts/ipc/node/ipc';
import { IElectronService } from 'vs/platform/electron/node/electron'; import { IElectronService } from 'vs/platform/electron/node/electron';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export interface IRelayOpenURLOptions extends IOpenURLOptions { export interface IRelayOpenURLOptions extends IOpenURLOptions {
openToSide?: boolean; openToSide?: boolean;
...@@ -27,7 +28,7 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener ...@@ -27,7 +28,7 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener
constructor( constructor(
@IMainProcessService mainProcessService: IMainProcessService, @IMainProcessService mainProcessService: IMainProcessService,
@IOpenerService openerService: IOpenerService, @IOpenerService openerService: IOpenerService,
@IElectronEnvironmentService private electronEnvironmentService: IElectronEnvironmentService, @IWorkbenchEnvironmentService private readonly environmentService: INativeWorkbenchEnvironmentService,
@IElectronService private electronService: IElectronService @IElectronService private electronService: IElectronService
) { ) {
super(); super();
...@@ -43,9 +44,9 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener ...@@ -43,9 +44,9 @@ export class RelayURLService extends URLService implements IURLHandler, IOpener
let query = uri.query; let query = uri.query;
if (!query) { if (!query) {
query = `windowId=${encodeURIComponent(this.electronEnvironmentService.windowId)}`; query = `windowId=${encodeURIComponent(this.environmentService.configuration.windowId)}`;
} else { } else {
query += `&windowId=${encodeURIComponent(this.electronEnvironmentService.windowId)}`; query += `&windowId=${encodeURIComponent(this.environmentService.configuration.windowId)}`;
} }
return uri.with({ query }); return uri.with({ query });
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService'; import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IElectronEnvironmentService } from 'vs/workbench/services/electron/electron-browser/electronEnvironmentService';
import { createChannelSender } from 'vs/base/parts/ipc/node/ipc'; import { createChannelSender } from 'vs/base/parts/ipc/node/ipc';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
export class NativeWorkspacesService { export class NativeWorkspacesService {
...@@ -15,9 +16,9 @@ export class NativeWorkspacesService { ...@@ -15,9 +16,9 @@ export class NativeWorkspacesService {
constructor( constructor(
@IMainProcessService mainProcessService: IMainProcessService, @IMainProcessService mainProcessService: IMainProcessService,
@IElectronEnvironmentService electronEnvironmentService: IElectronEnvironmentService @IWorkbenchEnvironmentService environmentService: INativeWorkbenchEnvironmentService
) { ) {
return createChannelSender<IWorkspacesService>(mainProcessService.getChannel('workspaces'), { context: electronEnvironmentService.windowId }); return createChannelSender<IWorkspacesService>(mainProcessService.getChannel('workspaces'), { context: environmentService.configuration.windowId });
} }
} }
......
...@@ -53,7 +53,7 @@ export const TestWindowConfiguration: INativeWindowConfiguration = { ...@@ -53,7 +53,7 @@ export const TestWindowConfiguration: INativeWindowConfiguration = {
...parseArgs(process.argv, OPTIONS) ...parseArgs(process.argv, OPTIONS)
}; };
export const TestEnvironmentService = new NativeWorkbenchEnvironmentService(TestWindowConfiguration, process.execPath, 0); export const TestEnvironmentService = new NativeWorkbenchEnvironmentService(TestWindowConfiguration, process.execPath);
export class TestTextFileService extends NativeTextFileService { export class TestTextFileService extends NativeTextFileService {
private resolveTextContentError!: FileOperationError | null; private resolveTextContentError!: FileOperationError | null;
......
...@@ -24,12 +24,14 @@ import 'vs/workbench/browser/web.main'; ...@@ -24,12 +24,14 @@ import 'vs/workbench/browser/web.main';
//#endregion //#endregion
////#region --- workbench parts
//#region --- workbench parts
import 'vs/workbench/browser/parts/titlebar/titlebarPart'; import 'vs/workbench/browser/parts/titlebar/titlebarPart';
//#endregion //#endregion
//#region --- workbench services //#region --- workbench services
import 'vs/workbench/services/integrity/browser/integrityService'; import 'vs/workbench/services/integrity/browser/integrityService';
import 'vs/workbench/services/textMate/browser/textMateService'; import 'vs/workbench/services/textMate/browser/textMateService';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册