提交 3c28234a 编写于 作者: B Benjamin Pasero

fileservice2 => fileservice

上级 d8b38677
......@@ -19,7 +19,7 @@ import { RemoteAuthorityResolverService } from 'vs/platform/remote/browser/remot
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { IFileService } from 'vs/platform/files/common/files';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { Schemas } from 'vs/base/common/network';
class CodeRendererMain extends Disposable {
......@@ -78,7 +78,7 @@ class CodeRendererMain extends Disposable {
serviceCollection.set(IRemoteAgentService, remoteAgentService);
// Files
const fileService = this._register(new FileService2(logService));
const fileService = this._register(new FileService(logService));
serviceCollection.set(IFileService, fileService);
const connection = remoteAgentService.getConnection();
......
......@@ -46,7 +46,7 @@ import { TestExperimentService } from 'vs/workbench/contrib/experiments/test/ele
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { ExtensionType } from 'vs/platform/extensions/common/extensions';
import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { Schemas } from 'vs/base/common/network';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
......@@ -282,7 +282,7 @@ suite('ExtensionsTipsService Test', () => {
const myWorkspace = testWorkspace(URI.from({ scheme: 'file', path: folderDir }));
workspaceService = new TestContextService(myWorkspace);
instantiationService.stub(IWorkspaceContextService, workspaceService);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
instantiationService.stub(IFileService, fileService);
}
......
......@@ -41,7 +41,7 @@ import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-brow
import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver';
import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { IFileService } from 'vs/platform/files/common/files';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/electron-browser/diskFileSystemProvider';
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
......@@ -190,7 +190,7 @@ class CodeRendererMain extends Disposable {
serviceCollection.set(IRemoteAgentService, remoteAgentService);
// Files
const fileService = this._register(new FileService2(logService));
const fileService = this._register(new FileService(logService));
serviceCollection.set(IFileService, fileService);
const diskFileSystemProvider = this._register(new DiskFileSystemProvider(logService));
......@@ -295,7 +295,7 @@ class CodeRendererMain extends Disposable {
}, error => onUnexpectedError(error));
}
private createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: FileService2, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise<WorkspaceService> {
private createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: FileService, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise<WorkspaceService> {
const configurationFileService = new ConfigurationFileService();
configurationFileService.fileService = fileService;
......
......@@ -17,7 +17,7 @@ import { getRandomTestPath } from 'vs/base/test/node/testUtils';
import { DefaultEndOfLine } from 'vs/editor/common/model';
import { Schemas } from 'vs/base/common/network';
import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
import { WorkbenchEnvironmentService } from 'vs/workbench/services/environment/node/environmentService';
......@@ -55,7 +55,7 @@ class TestBackupEnvironmentService extends WorkbenchEnvironmentService {
class TestBackupFileService extends BackupFileService {
constructor(workspace: Uri, backupHome: string, workspacesJsonPath: string) {
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
const environmentService = new TestBackupEnvironmentService(workspaceBackupPath);
......
......@@ -33,7 +33,7 @@ import { URI } from 'vs/base/common/uri';
import { createHash } from 'crypto';
import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { Schemas } from 'vs/base/common/network';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
......@@ -109,7 +109,7 @@ suite('ConfigurationEditingService', () => {
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);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
instantiationService.stub(IFileService, fileService);
instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService));
......
......@@ -37,7 +37,7 @@ import { IWindowConfiguration } from 'vs/platform/windows/common/windows';
import { RemoteAgentService } from 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
import { RemoteAuthorityResolverService } from 'vs/platform/remote/electron-browser/remoteAuthorityResolverService';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
import { ConfigurationCache } from 'vs/workbench/services/configuration/node/configurationCache';
......@@ -218,7 +218,7 @@ suite('WorkspaceContextService - Workspace Editing', () => {
const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, path.join(parentDir, 'settings.json'));
const remoteAgentService = instantiationService.createInstance(RemoteAgentService, {});
instantiationService.stub(IRemoteAgentService, remoteAgentService);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
const configurationFileService = new ConfigurationFileService();
configurationFileService.fileService = fileService;
......@@ -479,7 +479,7 @@ suite('WorkspaceService - Initialization', () => {
const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile);
const remoteAgentService = instantiationService.createInstance(RemoteAgentService, {});
instantiationService.stub(IRemoteAgentService, remoteAgentService);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
const configurationFileService = new ConfigurationFileService();
configurationFileService.fileService = fileService;
......@@ -743,7 +743,7 @@ suite('WorkspaceConfigurationService - Folder', () => {
const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile);
const remoteAgentService = instantiationService.createInstance(RemoteAgentService, {});
instantiationService.stub(IRemoteAgentService, remoteAgentService);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
const configurationFileService = new ConfigurationFileService();
configurationFileService.fileService = fileService;
......@@ -1071,7 +1071,7 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, path.join(parentDir, 'settings.json'));
const remoteAgentService = instantiationService.createInstance(RemoteAgentService, {});
instantiationService.stub(IRemoteAgentService, remoteAgentService);
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
const configurationFileService = new ConfigurationFileService();
configurationFileService.fileService = fileService;
......
......@@ -18,7 +18,7 @@ import { VSBuffer, VSBufferReadable, readableToBuffer, bufferToReadable, streamT
import { Queue } from 'vs/base/common/async';
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
export class FileService2 extends Disposable implements IFileService {
export class FileService extends Disposable implements IFileService {
_serviceBrand: ServiceIdentifier<any>;
......
......@@ -16,14 +16,14 @@ import { onUnexpectedError } from 'vs/base/common/errors';
import { StorageScope, IStorageService } from 'vs/platform/storage/common/storage';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { localize } from 'vs/nls';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
export class WorkspaceWatcher extends Disposable {
private watches = new ResourceMap<IDisposable>();
constructor(
@IFileService private readonly fileService: FileService2,
@IFileService private readonly fileService: FileService,
@IConfigurationService private readonly configurationService: IConfigurationService,
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
@INotificationService private readonly notificationService: INotificationService,
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { URI } from 'vs/base/common/uri';
import { IFileSystemProviderRegistrationEvent, FileSystemProviderCapabilities } from 'vs/platform/files/common/files';
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
......@@ -15,7 +15,7 @@ import { timeout } from 'vs/base/common/async';
suite('File Service 2', () => {
test('provider registration', async () => {
const service = new FileService2(new NullLogService());
const service = new FileService(new NullLogService());
const resource = URI.parse('test://foo/bar');
assert.equal(service.canHandleResource(resource), false);
......@@ -64,7 +64,7 @@ suite('File Service 2', () => {
});
test('watch', async () => {
const service = new FileService2(new NullLogService());
const service = new FileService(new NullLogService());
let disposeCounter = 0;
service.registerProvider('test', new NullFileSystemProvider(() => {
......
......@@ -5,7 +5,7 @@
import * as assert from 'assert';
import { tmpdir } from 'os';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { Schemas } from 'vs/base/common/network';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
......@@ -104,7 +104,7 @@ suite('Disk File Service', () => {
const parentDir = getRandomTestPath(tmpdir(), 'vsctests', 'diskfileservice');
const testSchema = 'test';
let service: FileService2;
let service: FileService;
let fileProvider: TestDiskFileSystemProvider;
let testProvider: TestDiskFileSystemProvider;
let testDir: string;
......@@ -114,7 +114,7 @@ suite('Disk File Service', () => {
setup(async () => {
const logService = new NullLogService();
service = new FileService2(logService);
service = new FileService(logService);
disposables.push(service);
fileProvider = new TestDiskFileSystemProvider(logService);
......
......@@ -41,7 +41,7 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile
import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService';
import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { TestBackupFileService, TestContextService, TestEditorGroupsService, TestEditorService, TestLifecycleService, TestLogService, TestTextFileService, TestTextResourcePropertiesService } from 'vs/workbench/test/workbenchTestServices';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { Schemas } from 'vs/base/common/network';
import { DiskFileSystemProvider } from 'vs/workbench/services/files/node/diskFileSystemProvider';
......@@ -81,7 +81,7 @@ suite('KeybindingsEditing', () => {
instantiationService.stub(ILogService, new TestLogService());
instantiationService.stub(ITextResourcePropertiesService, new TestTextResourcePropertiesService(instantiationService.get(IConfigurationService)));
instantiationService.stub(IModelService, instantiationService.createInstance(ModelServiceImpl));
const fileService = new FileService2(new NullLogService());
const fileService = new FileService(new NullLogService());
fileService.registerProvider(Schemas.file, new DiskFileSystemProvider(new NullLogService()));
instantiationService.stub(IFileService, fileService);
instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService));
......
......@@ -18,7 +18,7 @@ import { Schemas } from 'vs/base/common/network';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { rimraf, RimRafMode, copy, readFile, exists } from 'vs/base/node/pfs';
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
import { FileService2 } from 'vs/workbench/services/files/common/fileService2';
import { FileService } from 'vs/workbench/services/files/common/fileService';
import { NullLogService } from 'vs/platform/log/common/log';
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
import { tmpdir } from 'os';
......@@ -84,7 +84,7 @@ suite('Files - TextFileService i/o', () => {
accessor = instantiationService.createInstance(ServiceAccessor);
const logService = new NullLogService();
const fileService = new FileService2(logService);
const fileService = new FileService(logService);
const fileProvider = new DiskFileSystemProvider(logService);
disposables.push(fileService.registerProvider(Schemas.file, fileProvider));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册