remove getConfiguration() from workspace service
This commit is contained in:
parent
ffd210a7a5
commit
d1491f4ac5
|
@ -18,11 +18,6 @@ export interface IWorkspaceContextService {
|
||||||
*/
|
*/
|
||||||
getWorkspace(): IWorkspace;
|
getWorkspace(): IWorkspace;
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides access to the configuration object the platform is running with.
|
|
||||||
*/
|
|
||||||
getConfiguration(): IConfiguration;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides access to the options object the platform is running with.
|
* Provides access to the options object the platform is running with.
|
||||||
*/
|
*/
|
||||||
|
@ -75,21 +70,4 @@ export interface IWorkspace {
|
||||||
* is just derived from the workspace name.
|
* is just derived from the workspace name.
|
||||||
*/
|
*/
|
||||||
uid?: number;
|
uid?: number;
|
||||||
}
|
|
||||||
|
|
||||||
export interface IConfiguration {
|
|
||||||
/**
|
|
||||||
* Some environmental flags
|
|
||||||
*/
|
|
||||||
env?: IEnvironment;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IEnvironment {
|
|
||||||
appRoot: string;
|
|
||||||
|
|
||||||
extensionDevelopmentPath: string;
|
|
||||||
extensionTestsPath: string;
|
|
||||||
|
|
||||||
recentFiles: string[];
|
|
||||||
recentFolders: string[];
|
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import URI from 'vs/base/common/uri';
|
import URI from 'vs/base/common/uri';
|
||||||
import paths = require('vs/base/common/paths');
|
import paths = require('vs/base/common/paths');
|
||||||
import {IWorkspaceContextService, IWorkspace, IConfiguration} from 'vs/platform/workspace/common/workspace';
|
import {IWorkspaceContextService, IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple IWorkspaceContextService implementation to allow sharing of this service implementation
|
* Simple IWorkspaceContextService implementation to allow sharing of this service implementation
|
||||||
|
@ -19,11 +19,9 @@ export class BaseWorkspaceContextService implements IWorkspaceContextService {
|
||||||
protected options: any;
|
protected options: any;
|
||||||
|
|
||||||
private workspace: IWorkspace;
|
private workspace: IWorkspace;
|
||||||
private configuration: IConfiguration;
|
|
||||||
|
|
||||||
constructor(workspace: IWorkspace, configuration?: IConfiguration, options: any = {}) {
|
constructor(workspace: IWorkspace, options: any = {}) {
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
this.configuration = configuration;
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,10 +29,6 @@ export class BaseWorkspaceContextService implements IWorkspaceContextService {
|
||||||
return this.workspace;
|
return this.workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getConfiguration(): IConfiguration {
|
|
||||||
return this.configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getOptions(): any {
|
public getOptions(): any {
|
||||||
return this.options;
|
return this.options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ import {IEditorInput, IEditorModel, Position, Direction, IEditor, IResourceInput
|
||||||
import {IEventService} from 'vs/platform/event/common/event';
|
import {IEventService} from 'vs/platform/event/common/event';
|
||||||
import {IUntitledEditorService} from 'vs/workbench/services/untitled/common/untitledEditorService';
|
import {IUntitledEditorService} from 'vs/workbench/services/untitled/common/untitledEditorService';
|
||||||
import {IMessageService, IConfirmation} from 'vs/platform/message/common/message';
|
import {IMessageService, IConfirmation} from 'vs/platform/message/common/message';
|
||||||
import {IWorkspace, IConfiguration} from 'vs/platform/workspace/common/workspace';
|
import {IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||||
import {ILifecycleService, ShutdownEvent} from 'vs/platform/lifecycle/common/lifecycle';
|
import {ILifecycleService, ShutdownEvent} from 'vs/platform/lifecycle/common/lifecycle';
|
||||||
import {EditorStacksModel} from 'vs/workbench/common/editor/editorStacksModel';
|
import {EditorStacksModel} from 'vs/workbench/common/editor/editorStacksModel';
|
||||||
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
|
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
|
||||||
|
@ -51,22 +51,16 @@ export const TestWorkspace: IWorkspace = {
|
||||||
mtime: new Date().getTime()
|
mtime: new Date().getTime()
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TestConfiguration: IConfiguration = {
|
|
||||||
env: Object.create(null)
|
|
||||||
};
|
|
||||||
|
|
||||||
export const TestEnvironmentService = new EnvironmentService(Objects.assign(parseArgs(process.argv), { execPath: process.execPath }));
|
export const TestEnvironmentService = new EnvironmentService(Objects.assign(parseArgs(process.argv), { execPath: process.execPath }));
|
||||||
|
|
||||||
export class TestContextService implements WorkspaceContextService.IWorkspaceContextService {
|
export class TestContextService implements WorkspaceContextService.IWorkspaceContextService {
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
|
|
||||||
private workspace: any;
|
private workspace: any;
|
||||||
private configuration: any;
|
|
||||||
private options: any;
|
private options: any;
|
||||||
|
|
||||||
constructor(workspace: any = TestWorkspace, configuration: any = TestConfiguration, options: any = null) {
|
constructor(workspace: any = TestWorkspace, options: any = null) {
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
this.configuration = configuration;
|
|
||||||
this.options = options || {
|
this.options = options || {
|
||||||
globalSettings: {
|
globalSettings: {
|
||||||
settings: {}
|
settings: {}
|
||||||
|
@ -78,10 +72,6 @@ export class TestContextService implements WorkspaceContextService.IWorkspaceCon
|
||||||
return this.workspace;
|
return this.workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getConfiguration(): IConfiguration {
|
|
||||||
return this.configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getOptions() {
|
public getOptions() {
|
||||||
return this.options;
|
return this.options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,11 +55,6 @@ export interface IConfiguration extends IEnvironment {
|
||||||
|
|
||||||
export function startup(configuration: IConfiguration, globalSettings: IGlobalSettings): winjs.TPromise<void> {
|
export function startup(configuration: IConfiguration, globalSettings: IGlobalSettings): winjs.TPromise<void> {
|
||||||
|
|
||||||
// Shell Configuration
|
|
||||||
const shellConfiguration: any = {
|
|
||||||
env: configuration
|
|
||||||
};
|
|
||||||
|
|
||||||
// Shell Options
|
// Shell Options
|
||||||
const filesToOpen = configuration.filesToOpen && configuration.filesToOpen.length ? toInputs(configuration.filesToOpen) : null;
|
const filesToOpen = configuration.filesToOpen && configuration.filesToOpen.length ? toInputs(configuration.filesToOpen) : null;
|
||||||
const filesToCreate = configuration.filesToCreate && configuration.filesToCreate.length ? toInputs(configuration.filesToCreate) : null;
|
const filesToCreate = configuration.filesToCreate && configuration.filesToCreate.length ? toInputs(configuration.filesToCreate) : null;
|
||||||
|
@ -78,7 +73,7 @@ export function startup(configuration: IConfiguration, globalSettings: IGlobalSe
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open workbench
|
// Open workbench
|
||||||
return openWorkbench(configuration, getWorkspace(configuration.workspacePath), shellConfiguration, shellOptions);
|
return openWorkbench(configuration, getWorkspace(configuration.workspacePath), shellOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toInputs(paths: IPath[]): IResourceInput[] {
|
function toInputs(paths: IPath[]): IResourceInput[] {
|
||||||
|
@ -127,10 +122,10 @@ function getWorkspace(workspacePath: string): IWorkspace {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function openWorkbench(environment: IEnvironment, workspace: IWorkspace, configuration: IConfiguration, options: IOptions): winjs.TPromise<void> {
|
function openWorkbench(environment: IEnvironment, workspace: IWorkspace, options: IOptions): winjs.TPromise<void> {
|
||||||
const eventService = new EventService();
|
const eventService = new EventService();
|
||||||
const environmentService = new EnvironmentService(environment);
|
const environmentService = new EnvironmentService(environment);
|
||||||
const contextService = new WorkspaceContextService(eventService, workspace, configuration, options);
|
const contextService = new WorkspaceContextService(eventService, workspace, options);
|
||||||
const configurationService = new ConfigurationService(contextService, eventService, environmentService);
|
const configurationService = new ConfigurationService(contextService, eventService, environmentService);
|
||||||
|
|
||||||
// Since the configuration service is one of the core services that is used in so many places, we initialize it
|
// Since the configuration service is one of the core services that is used in so many places, we initialize it
|
||||||
|
@ -148,7 +143,7 @@ function openWorkbench(environment: IEnvironment, workspace: IWorkspace, configu
|
||||||
eventService,
|
eventService,
|
||||||
contextService,
|
contextService,
|
||||||
environmentService
|
environmentService
|
||||||
}, configuration, options);
|
}, options);
|
||||||
shell.open();
|
shell.open();
|
||||||
|
|
||||||
shell.joinCreation().then(() => {
|
shell.joinCreation().then(() => {
|
||||||
|
|
|
@ -64,7 +64,7 @@ import {ISearchService} from 'vs/platform/search/common/search';
|
||||||
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
|
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
|
||||||
import {ICommandService} from 'vs/platform/commands/common/commands';
|
import {ICommandService} from 'vs/platform/commands/common/commands';
|
||||||
import {CommandService} from 'vs/platform/commands/common/commandService';
|
import {CommandService} from 'vs/platform/commands/common/commandService';
|
||||||
import {IWorkspaceContextService, IConfiguration, IWorkspace} from 'vs/platform/workspace/common/workspace';
|
import {IWorkspaceContextService, IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||||
import {IExtensionService} from 'vs/platform/extensions/common/extensions';
|
import {IExtensionService} from 'vs/platform/extensions/common/extensions';
|
||||||
import {MainThreadModeServiceImpl} from 'vs/editor/common/services/modeServiceImpl';
|
import {MainThreadModeServiceImpl} from 'vs/editor/common/services/modeServiceImpl';
|
||||||
import {IModeService} from 'vs/editor/common/services/modeService';
|
import {IModeService} from 'vs/editor/common/services/modeService';
|
||||||
|
@ -119,16 +119,14 @@ export class WorkbenchShell {
|
||||||
private content: HTMLElement;
|
private content: HTMLElement;
|
||||||
private contentsContainer: Builder;
|
private contentsContainer: Builder;
|
||||||
|
|
||||||
private configuration: IConfiguration;
|
|
||||||
private workspace: IWorkspace;
|
private workspace: IWorkspace;
|
||||||
private options: IOptions;
|
private options: IOptions;
|
||||||
private workbench: Workbench;
|
private workbench: Workbench;
|
||||||
|
|
||||||
constructor(container: HTMLElement, workspace: IWorkspace, services: ICoreServices, configuration: IConfiguration, options: IOptions) {
|
constructor(container: HTMLElement, workspace: IWorkspace, services: ICoreServices, options: IOptions) {
|
||||||
this.container = container;
|
this.container = container;
|
||||||
|
|
||||||
this.workspace = workspace;
|
this.workspace = workspace;
|
||||||
this.configuration = configuration;
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|
||||||
this.contextService = services.contextService;
|
this.contextService = services.contextService;
|
||||||
|
@ -158,7 +156,7 @@ export class WorkbenchShell {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workbench
|
// Workbench
|
||||||
this.workbench = instantiationService.createInstance(Workbench, workbenchContainer.getHTMLElement(), this.workspace, this.configuration, this.options, serviceCollection);
|
this.workbench = instantiationService.createInstance(Workbench, workbenchContainer.getHTMLElement(), this.workspace, this.options, serviceCollection);
|
||||||
this.workbench.startup({
|
this.workbench.startup({
|
||||||
onWorkbenchStarted: (customKeybindingsCount) => {
|
onWorkbenchStarted: (customKeybindingsCount) => {
|
||||||
this.onWorkbenchStarted(customKeybindingsCount);
|
this.onWorkbenchStarted(customKeybindingsCount);
|
||||||
|
@ -239,7 +237,7 @@ export class WorkbenchShell {
|
||||||
serviceCollection.set(IWindowService, this.windowService);
|
serviceCollection.set(IWindowService, this.windowService);
|
||||||
|
|
||||||
// Storage
|
// Storage
|
||||||
const disableWorkspaceStorage = this.configuration.env.extensionTestsPath || (!this.workspace && !this.environmentService.extensionDevelopmentPath); // without workspace or in any extension test, we use inMemory storage unless we develop an extension where we want to preserve state
|
const disableWorkspaceStorage = this.environmentService.extensionTestsPath || (!this.workspace && !this.environmentService.extensionDevelopmentPath); // without workspace or in any extension test, we use inMemory storage unless we develop an extension where we want to preserve state
|
||||||
this.storageService = instantiationService.createInstance(Storage, window.localStorage, disableWorkspaceStorage ? inMemoryLocalStorageInstance : window.localStorage);
|
this.storageService = instantiationService.createInstance(Storage, window.localStorage, disableWorkspaceStorage ? inMemoryLocalStorageInstance : window.localStorage);
|
||||||
serviceCollection.set(IStorageService, this.storageService);
|
serviceCollection.set(IStorageService, this.storageService);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ import {IStorageService, StorageScope} from 'vs/platform/storage/common/storage'
|
||||||
import {ContextMenuService} from 'vs/workbench/services/contextview/electron-browser/contextmenuService';
|
import {ContextMenuService} from 'vs/workbench/services/contextview/electron-browser/contextmenuService';
|
||||||
import {WorkbenchKeybindingService} from 'vs/workbench/services/keybinding/electron-browser/keybindingService';
|
import {WorkbenchKeybindingService} from 'vs/workbench/services/keybinding/electron-browser/keybindingService';
|
||||||
import {ContextKeyService} from 'vs/platform/contextkey/browser/contextKeyService';
|
import {ContextKeyService} from 'vs/platform/contextkey/browser/contextKeyService';
|
||||||
import {IWorkspace, IConfiguration} from 'vs/platform/workspace/common/workspace';
|
import {IWorkspace} from 'vs/platform/workspace/common/workspace';
|
||||||
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
|
||||||
import {ContextKeyExpr, RawContextKey, IContextKeyService, IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
import {ContextKeyExpr, RawContextKey, IContextKeyService, IContextKey} from 'vs/platform/contextkey/common/contextkey';
|
||||||
import {IActivityService} from 'vs/workbench/services/activity/common/activityService';
|
import {IActivityService} from 'vs/workbench/services/activity/common/activityService';
|
||||||
|
@ -76,7 +76,6 @@ export const NoEditorsVisibleContext:ContextKeyExpr = EditorsVisibleContext.toNe
|
||||||
|
|
||||||
interface WorkbenchParams {
|
interface WorkbenchParams {
|
||||||
workspace?: IWorkspace;
|
workspace?: IWorkspace;
|
||||||
configuration: IConfiguration;
|
|
||||||
options: IOptions;
|
options: IOptions;
|
||||||
serviceCollection: ServiceCollection;
|
serviceCollection: ServiceCollection;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +130,6 @@ export class Workbench implements IPartService {
|
||||||
constructor(
|
constructor(
|
||||||
container: HTMLElement,
|
container: HTMLElement,
|
||||||
workspace: IWorkspace,
|
workspace: IWorkspace,
|
||||||
configuration: IConfiguration,
|
|
||||||
options: IOptions,
|
options: IOptions,
|
||||||
serviceCollection: ServiceCollection,
|
serviceCollection: ServiceCollection,
|
||||||
@IInstantiationService private instantiationService: IInstantiationService,
|
@IInstantiationService private instantiationService: IInstantiationService,
|
||||||
|
@ -146,7 +144,7 @@ export class Workbench implements IPartService {
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// Validate params
|
// Validate params
|
||||||
this.validateParams(container, configuration, options);
|
this.validateParams(container, options);
|
||||||
|
|
||||||
// If String passed in as container, try to find it in DOM
|
// If String passed in as container, try to find it in DOM
|
||||||
if (types.isString(container)) {
|
if (types.isString(container)) {
|
||||||
|
@ -161,7 +159,6 @@ export class Workbench implements IPartService {
|
||||||
|
|
||||||
this.workbenchParams = {
|
this.workbenchParams = {
|
||||||
workspace: workspace,
|
workspace: workspace,
|
||||||
configuration: configuration,
|
|
||||||
options: options || {},
|
options: options || {},
|
||||||
serviceCollection
|
serviceCollection
|
||||||
};
|
};
|
||||||
|
@ -175,7 +172,7 @@ export class Workbench implements IPartService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private validateParams(container: HTMLElement, configuration: IConfiguration, options: IOptions): void {
|
private validateParams(container: HTMLElement, options: IOptions): void {
|
||||||
|
|
||||||
// Container
|
// Container
|
||||||
assert.ok(container, 'Workbench requires a container to be created with');
|
assert.ok(container, 'Workbench requires a container to be created with');
|
||||||
|
|
|
@ -44,7 +44,6 @@ export interface IInitData {
|
||||||
threadService: any;
|
threadService: any;
|
||||||
contextService: {
|
contextService: {
|
||||||
workspace: any;
|
workspace: any;
|
||||||
configuration: any;
|
|
||||||
options: any;
|
options: any;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -74,7 +73,7 @@ export class ExtensionHostMain {
|
||||||
|
|
||||||
this._environment = initData.environment;
|
this._environment = initData.environment;
|
||||||
|
|
||||||
this._contextService = new BaseWorkspaceContextService(initData.contextService.workspace, initData.contextService.configuration, initData.contextService.options);
|
this._contextService = new BaseWorkspaceContextService(initData.contextService.workspace, initData.contextService.options);
|
||||||
const workspaceStoragePath = this._getOrCreateWorkspaceStoragePath();
|
const workspaceStoragePath = this._getOrCreateWorkspaceStoragePath();
|
||||||
|
|
||||||
const threadService = new ExtHostThreadService(remoteCom);
|
const threadService = new ExtHostThreadService(remoteCom);
|
||||||
|
|
|
@ -177,7 +177,6 @@ class ExtensionHostProcessManager {
|
||||||
},
|
},
|
||||||
contextService: {
|
contextService: {
|
||||||
workspace: this.contextService.getWorkspace(),
|
workspace: this.contextService.getWorkspace(),
|
||||||
configuration: this.contextService.getConfiguration(),
|
|
||||||
options: this.contextService.getOptions()
|
options: this.contextService.getOptions()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {IOptions} from 'vs/workbench/common/options';
|
||||||
import {EventType, OptionsChangeEvent} from 'vs/workbench/common/events';
|
import {EventType, OptionsChangeEvent} from 'vs/workbench/common/events';
|
||||||
import {IEventService} from 'vs/platform/event/common/event';
|
import {IEventService} from 'vs/platform/event/common/event';
|
||||||
import {createDecorator} from 'vs/platform/instantiation/common/instantiation';
|
import {createDecorator} from 'vs/platform/instantiation/common/instantiation';
|
||||||
import {IWorkspace, IConfiguration, IWorkspaceContextService as IBaseWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
import {IWorkspace, IWorkspaceContextService as IBaseWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
||||||
import {BaseWorkspaceContextService} from 'vs/platform/workspace/common/workspaceContextService';
|
import {BaseWorkspaceContextService} from 'vs/platform/workspace/common/workspaceContextService';
|
||||||
|
|
||||||
export const IWorkspaceContextService = createDecorator<IWorkspaceContextService>('contextService');
|
export const IWorkspaceContextService = createDecorator<IWorkspaceContextService>('contextService');
|
||||||
|
@ -33,10 +33,9 @@ export class WorkspaceContextService extends BaseWorkspaceContextService impleme
|
||||||
constructor(
|
constructor(
|
||||||
private eventService: IEventService,
|
private eventService: IEventService,
|
||||||
workspace: IWorkspace,
|
workspace: IWorkspace,
|
||||||
configuration?: IConfiguration,
|
|
||||||
options: any = {}
|
options: any = {}
|
||||||
) {
|
) {
|
||||||
super(workspace, configuration, options);
|
super(workspace, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateOptions(key: string, value: any): void {
|
public updateOptions(key: string, value: any): void {
|
||||||
|
|
|
@ -105,7 +105,7 @@ suite('Workbench Part', () => {
|
||||||
fixture = document.createElement('div');
|
fixture = document.createElement('div');
|
||||||
fixture.id = fixtureId;
|
fixture.id = fixtureId;
|
||||||
document.body.appendChild(fixture);
|
document.body.appendChild(fixture);
|
||||||
context = new BaseWorkspaceContextService(TestUtils.TestWorkspace, TestUtils.TestConfiguration, null);
|
context = new BaseWorkspaceContextService(TestUtils.TestWorkspace, null);
|
||||||
storage = new Storage(new InMemoryLocalStorage(), null, context);
|
storage = new Storage(new InMemoryLocalStorage(), null, context);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {QuickOpenHandler, IQuickOpenRegistry, Extensions} from 'vs/workbench/bro
|
||||||
import {Registry} from 'vs/platform/platform';
|
import {Registry} from 'vs/platform/platform';
|
||||||
import {SearchService} from 'vs/workbench/services/search/node/searchService';
|
import {SearchService} from 'vs/workbench/services/search/node/searchService';
|
||||||
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
|
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
|
||||||
import {TestEnvironmentService, TestConfiguration, TestEditorService, TestEditorGroupService} from 'vs/test/utils/servicesTestUtils';
|
import {TestEnvironmentService, TestEditorService, TestEditorGroupService} from 'vs/test/utils/servicesTestUtils';
|
||||||
import {IEnvironmentService} from 'vs/platform/environment/common/environment';
|
import {IEnvironmentService} from 'vs/platform/environment/common/environment';
|
||||||
import * as Timer from 'vs/base/common/timer';
|
import * as Timer from 'vs/base/common/timer';
|
||||||
import {TPromise} from 'vs/base/common/winjs.base';
|
import {TPromise} from 'vs/base/common/winjs.base';
|
||||||
|
@ -50,7 +50,7 @@ suite('QuickOpen performance', () => {
|
||||||
name: null,
|
name: null,
|
||||||
uid: null,
|
uid: null,
|
||||||
mtime: null
|
mtime: null
|
||||||
}, TestConfiguration),
|
}),
|
||||||
|
|
||||||
telemetryService
|
telemetryService
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@ import * as assert from 'assert';
|
||||||
import {EditorStacksModel, EditorGroup} from 'vs/workbench/common/editor/editorStacksModel';
|
import {EditorStacksModel, EditorGroup} from 'vs/workbench/common/editor/editorStacksModel';
|
||||||
import {EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory} from 'vs/workbench/common/editor';
|
import {EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory} from 'vs/workbench/common/editor';
|
||||||
import URI from 'vs/base/common/uri';
|
import URI from 'vs/base/common/uri';
|
||||||
import {TestStorageService, TestConfigurationService, TestLifecycleService, TestContextService, TestWorkspace, TestConfiguration} from 'vs/test/utils/servicesTestUtils';
|
import {TestStorageService, TestConfigurationService, TestLifecycleService, TestContextService, TestWorkspace} from 'vs/test/utils/servicesTestUtils';
|
||||||
import { TestInstantiationService } from 'vs/test/utils/instantiationTestUtils';
|
import { TestInstantiationService } from 'vs/test/utils/instantiationTestUtils';
|
||||||
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
|
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
|
||||||
import {IStorageService} from 'vs/platform/storage/common/storage';
|
import {IStorageService} from 'vs/platform/storage/common/storage';
|
||||||
|
@ -1384,7 +1384,7 @@ suite('Editor Stacks Model', () => {
|
||||||
let inst = new TestInstantiationService();
|
let inst = new TestInstantiationService();
|
||||||
|
|
||||||
inst.stub(IStorageService, new TestStorageService());
|
inst.stub(IStorageService, new TestStorageService());
|
||||||
inst.stub(IWorkspaceContextService, new TestContextService(TestWorkspace, TestConfiguration, { filesToCreate: [true] }));
|
inst.stub(IWorkspaceContextService, new TestContextService(TestWorkspace, { filesToCreate: [true] }));
|
||||||
const lifecycle = new TestLifecycleService();
|
const lifecycle = new TestLifecycleService();
|
||||||
inst.stub(ILifecycleService, lifecycle);
|
inst.stub(ILifecycleService, lifecycle);
|
||||||
const config = new TestConfigurationService();
|
const config = new TestConfigurationService();
|
||||||
|
|
|
@ -17,7 +17,7 @@ suite('Workbench Memento', () => {
|
||||||
let storage;
|
let storage;
|
||||||
|
|
||||||
setup(() => {
|
setup(() => {
|
||||||
context = new BaseWorkspaceContextService(TestUtils.TestWorkspace, TestUtils.TestConfiguration, null);
|
context = new BaseWorkspaceContextService(TestUtils.TestWorkspace, null);
|
||||||
storage = new Storage(new InMemoryLocalStorage(), null, context);
|
storage = new Storage(new InMemoryLocalStorage(), null, context);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue