Use user data service for reading settings

This commit is contained in:
Sandeep Somavarapu
2019-06-20 14:39:04 +02:00
parent 0c890df522
commit 0779716aae
6 changed files with 97 additions and 39 deletions

View File

@@ -39,6 +39,7 @@ import { Schemas } from 'vs/base/common/network';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
import { IFileService } from 'vs/platform/files/common/files';
import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache';
import { FileUserDataService } from 'vs/workbench/services/userData/common/fileUserDataService';
class SettingsTestEnvironmentService extends EnvironmentService {
@@ -107,7 +108,8 @@ suite('ConfigurationEditingService', () => {
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
instantiationService.stub(IFileService, fileService);
instantiationService.stub(IRemoteAgentService, remoteAgentService);
const workspaceService = new WorkspaceService({ userSettingsResource: environmentService.settingsResource, configurationCache: new ConfigurationCache(environmentService) }, fileService, remoteAgentService);
const userDataService = new FileUserDataService(environmentService, fileService);
const workspaceService = new WorkspaceService({ configurationCache: new ConfigurationCache(environmentService) }, fileService, userDataService, remoteAgentService);
instantiationService.stub(IWorkspaceContextService, workspaceService);
return workspaceService.initialize(noWorkspace ? { id: '' } : { folder: URI.file(workspaceDir), id: createHash('md5').update(URI.file(workspaceDir).toString()).digest('hex') }).then(() => {
instantiationService.stub(IConfigurationService, workspaceService);