Reduce extension host IInitData

This commit is contained in:
Alex Dima
2018-03-20 16:55:38 +01:00
parent f8007cd6bd
commit 262134cfd8
5 changed files with 9 additions and 17 deletions

View File

@@ -44,7 +44,6 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import { SerializedError } from 'vs/base/common/errors';
import { IStat, FileChangeType } from 'vs/platform/files/common/files';
import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
import { ParsedArgs } from 'vs/platform/environment/common/environment';
import { CommentRule, CharacterPair, EnterAction } from 'vs/editor/common/modes/languageConfiguration';
import { ISingleEditOperation } from 'vs/editor/common/model';
import { ILineMatch, IPatternInfo } from 'vs/platform/search/common/search';
@@ -77,9 +76,8 @@ export interface IInitData {
configuration: IConfigurationInitData;
telemetryInfo: ITelemetryInfo;
windowId: number;
args: ParsedArgs;
execPath: string;
logLevel: LogLevel;
logsPath: string;
}
export interface IConfigurationInitData extends IConfigurationData {

View File

@@ -20,7 +20,6 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
import { TernarySearchTree } from 'vs/base/common/map';
import { Barrier } from 'vs/base/common/async';
import { ILogService } from 'vs/platform/log/common/log';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ExtHostLogService } from 'vs/workbench/api/node/extHostLogService';
import URI from 'vs/base/common/uri';
@@ -140,8 +139,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
extHostContext: IExtHostContext,
extHostWorkspace: ExtHostWorkspace,
extHostConfiguration: ExtHostConfiguration,
extHostLogService: ExtHostLogService,
environmentService: IEnvironmentService
extHostLogService: ExtHostLogService
) {
this._barrier = new Barrier();
this._registry = new ExtensionDescriptionRegistry(initData.extensions);

View File

@@ -9,7 +9,6 @@ import { join } from 'vs/base/common/paths';
import { LogLevel } from 'vs/workbench/api/node/extHostTypes';
import { ILogService, DelegatedLogService } from 'vs/platform/log/common/log';
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ExtHostLogServiceShape } from 'vs/workbench/api/node/extHost.protocol';
@@ -20,9 +19,9 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
constructor(
private _windowId: number,
logLevel: LogLevel,
private _environmentService: IEnvironmentService
private _logsPath: string
) {
super(createSpdLogService(`exthost${_windowId}`, logLevel, _environmentService.logsPath));
super(createSpdLogService(`exthost${_windowId}`, logLevel, _logsPath));
}
$setLevel(level: LogLevel): void {
@@ -39,7 +38,7 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
}
getLogDirectory(extensionID: string): string {
return join(this._environmentService.logsPath, `${extensionID}_${this._windowId}`);
return join(this._logsPath, `${extensionID}_${this._windowId}`);
}
private createLogger(extensionID: string): ExtHostLogger {