Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9f0e79e9
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9f0e79e9
编写于
4月 03, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
file service => legacy file service
上级
8104e9f0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
28 addition
and
27 deletion
+28
-27
src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts
...sions/test/electron-browser/extensionsTipsService.test.ts
+2
-2
src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts
...es/backup/test/electron-browser/backupFileService.test.ts
+2
-2
src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts
...test/electron-browser/configurationEditingService.test.ts
+2
-2
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
...ration/test/electron-browser/configurationService.test.ts
+5
-5
src/vs/workbench/services/files/node/fileService.ts
src/vs/workbench/services/files/node/fileService.ts
+1
-1
src/vs/workbench/services/files/node/remoteFileService.ts
src/vs/workbench/services/files/node/remoteFileService.ts
+6
-6
src/vs/workbench/services/files/test/electron-browser/fileService.test.ts
.../services/files/test/electron-browser/fileService.test.ts
+7
-7
src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts
...eybinding/test/electron-browser/keybindingEditing.test.ts
+2
-2
src/vs/workbench/services/output/common/outputChannelModel.ts
...vs/workbench/services/output/common/outputChannelModel.ts
+1
-0
未找到文件。
src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -26,7 +26,7 @@ import { TestNotificationService } from 'vs/platform/notification/test/common/te
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
testWorkspace
}
from
'
vs/platform/workspace/test/common/testWorkspace
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
TestConfigurationService
}
from
'
vs/platform/configuration/test/common/testConfigurationService
'
;
import
{
IPager
}
from
'
vs/base/common/paging
'
;
import
{
assign
}
from
'
vs/base/common/objects
'
;
...
...
@@ -285,7 +285,7 @@ suite('ExtensionsTipsService Test', () => {
instantiationService
.
stub
(
IWorkspaceContextService
,
workspaceService
);
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
src/vs/workbench/services/backup/test/electron-browser/backupFileService.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -12,7 +12,7 @@ import * as path from 'vs/base/common/path';
import
*
as
pfs
from
'
vs/base/node/pfs
'
;
import
{
URI
as
Uri
}
from
'
vs/base/common/uri
'
;
import
{
BackupFileService
,
BackupFilesModel
,
hashPath
}
from
'
vs/workbench/services/backup/node/backupFileService
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
TextModel
,
createTextBufferFactory
}
from
'
vs/editor/common/model/textModel
'
;
import
{
TestContextService
,
TestTextResourceConfigurationService
,
TestEnvironmentService
,
TestWindowService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
getRandomTestPath
}
from
'
vs/base/test/node/testUtils
'
;
...
...
@@ -58,7 +58,7 @@ class TestBackupFileService extends BackupFileService {
constructor
(
workspace
:
Uri
,
backupHome
:
string
,
workspacesJsonPath
:
string
)
{
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
workspace
.
fsPath
,
toWorkspaceFolders
([{
path
:
workspace
.
fsPath
}]))),
TestEnvironmentService
,
...
...
src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -18,7 +18,7 @@ import { TestTextFileService, TestTextResourceConfigurationService, workbenchIns
import
*
as
uuid
from
'
vs/base/common/uuid
'
;
import
{
IConfigurationRegistry
,
Extensions
as
ConfigurationExtensions
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
WorkspaceService
}
from
'
vs/workbench/services/configuration/node/configurationService
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
ConfigurationEditingService
,
ConfigurationEditingError
,
ConfigurationEditingErrorCode
}
from
'
vs/workbench/services/configuration/common/configurationEditingService
'
;
import
{
WORKSPACE_STANDALONE_CONFIGURATIONS
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
IConfigurationService
,
ConfigurationTarget
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -112,7 +112,7 @@ suite('ConfigurationEditingService', () => {
instantiationService
.
stub
(
IConfigurationService
,
workspaceService
);
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -23,7 +23,7 @@ import { IFileService, FileChangesEvent, FileChangeType } from 'vs/platform/file
import
{
IWorkspaceContextService
,
WorkbenchState
,
IWorkspaceFoldersChangeEvent
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
ConfigurationTarget
,
IConfigurationService
,
IConfigurationChangeEvent
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
workbenchInstantiationService
,
TestTextResourceConfigurationService
,
TestTextFileService
,
TestEnvironmentService
}
from
'
vs/workbench/test/workbenchTestServices
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
TestInstantiationService
}
from
'
vs/platform/instantiation/test/common/instantiationServiceMock
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
...
...
@@ -230,7 +230,7 @@ suite('WorkspaceContextService - Workspace Editing', () => {
return
workspaceService
.
initialize
(
getWorkspaceIdentifier
(
configPath
)).
then
(()
=>
{
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
@@ -499,7 +499,7 @@ suite('WorkspaceService - Initialization', () => {
return
workspaceService
.
initialize
({
id
:
''
}).
then
(()
=>
{
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
@@ -763,7 +763,7 @@ suite('WorkspaceConfigurationService - Folder', () => {
return
workspaceService
.
initialize
(
convertToWorkspacePayload
(
URI
.
file
(
folderDir
))).
then
(()
=>
{
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
@@ -1061,7 +1061,7 @@ suite('WorkspaceConfigurationService-Multiroot', () => {
return
workspaceService
.
initialize
(
getWorkspaceIdentifier
(
configPath
)).
then
(()
=>
{
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
workspaceService
,
TestEnvironmentService
,
...
...
src/vs/workbench/services/files/node/fileService.ts
浏览文件 @
9f0e79e9
...
...
@@ -33,7 +33,7 @@ export interface IFileServiceTestOptions {
encodingOverride
?:
IEncodingOverride
[];
}
export
class
FileService
extends
Disposable
implements
ILegacyFileService
{
export
class
Legacy
FileService
extends
Disposable
implements
ILegacyFileService
{
_serviceBrand
:
any
;
...
...
src/vs/workbench/services/files/node/remoteFileService.ts
浏览文件 @
9f0e79e9
...
...
@@ -13,11 +13,11 @@ import { localize } from 'vs/nls';
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
FileOperation
,
FileOperationError
,
FileOperationEvent
,
FileOperationResult
,
FileWriteOptions
,
FileSystemProviderCapabilities
,
IContent
,
ICreateFileOptions
,
IFileSystemProvider
,
IResolveContentOptions
,
IStreamContent
,
ITextSnapshot
,
IUpdateContentOptions
,
StringSnapshot
,
ILegacyFileService
,
IFileService
,
toFileOperationResult
,
IFileStatWithMetadata
}
from
'
vs/platform/files/common/files
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
createReadableOfProvider
,
createReadableOfSnapshot
,
createWritableOfProvider
}
from
'
vs/workbench/services/files/node/streams
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
export
class
RemoteFileService
extends
FileService
{
export
class
LegacyRemoteFileService
extends
Legacy
FileService
{
private
readonly
_provider
:
Map
<
string
,
IFileSystemProvider
>
;
...
...
@@ -81,7 +81,7 @@ export class RemoteFileService extends FileService {
if
(
resource
.
scheme
===
Schemas
.
file
)
{
return
super
.
resolveContent
(
resource
,
options
);
}
else
{
return
this
.
_readFile
(
resource
,
options
).
then
(
RemoteFileService
.
_asContent
);
return
this
.
_readFile
(
resource
,
options
).
then
(
Legacy
RemoteFileService
.
_asContent
);
}
}
...
...
@@ -163,7 +163,7 @@ export class RemoteFileService extends FileService {
return
super
.
createFile
(
resource
,
content
,
options
);
}
else
{
return
this
.
_withProvider
(
resource
).
then
(
RemoteFileService
.
_throwIfFileSystemIsReadonly
).
then
(
provider
=>
{
return
this
.
_withProvider
(
resource
).
then
(
Legacy
RemoteFileService
.
_throwIfFileSystemIsReadonly
).
then
(
provider
=>
{
return
this
.
fileService
.
createFolder
(
resources
.
dirname
(
resource
)).
then
(()
=>
{
const
{
encoding
}
=
this
.
encoding
.
getWriteEncoding
(
resource
);
...
...
@@ -185,7 +185,7 @@ export class RemoteFileService extends FileService {
if
(
resource
.
scheme
===
Schemas
.
file
)
{
return
super
.
updateContent
(
resource
,
value
,
options
);
}
else
{
return
this
.
_withProvider
(
resource
).
then
(
RemoteFileService
.
_throwIfFileSystemIsReadonly
).
then
(
provider
=>
{
return
this
.
_withProvider
(
resource
).
then
(
Legacy
RemoteFileService
.
_throwIfFileSystemIsReadonly
).
then
(
provider
=>
{
return
this
.
fileService
.
createFolder
(
resources
.
dirname
(
resource
)).
then
(()
=>
{
const
snapshot
=
typeof
value
===
'
string
'
?
new
StringSnapshot
(
value
)
:
value
;
return
this
.
_writeFile
(
provider
,
resource
,
snapshot
,
options
&&
options
.
encoding
,
{
create
:
true
,
overwrite
:
true
});
...
...
@@ -227,4 +227,4 @@ export class RemoteFileService extends FileService {
}
}
registerSingleton
(
ILegacyFileService
,
RemoteFileService
);
\ No newline at end of file
registerSingleton
(
ILegacyFileService
,
LegacyRemoteFileService
);
\ No newline at end of file
src/vs/workbench/services/files/test/electron-browser/fileService.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -7,7 +7,7 @@ import * as fs from 'fs';
import
*
as
path
from
'
vs/base/common/path
'
;
import
*
as
os
from
'
os
'
;
import
*
as
assert
from
'
assert
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
FileOperation
,
FileOperationEvent
,
FileOperationResult
,
FileOperationError
}
from
'
vs/platform/files/common/files
'
;
import
{
URI
as
uri
}
from
'
vs/base/common/uri
'
;
import
*
as
uuid
from
'
vs/base/common/uuid
'
;
...
...
@@ -25,8 +25,8 @@ import { NullLogService } from 'vs/platform/log/common/log';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
DiskFileSystemProvider
}
from
'
vs/workbench/services/files2/node/diskFileSystemProvider
'
;
suite
(
'
FileService
'
,
()
=>
{
let
service
:
FileService
;
suite
(
'
Legacy
FileService
'
,
()
=>
{
let
service
:
Legacy
FileService
;
const
parentDir
=
getRandomTestPath
(
os
.
tmpdir
(),
'
vsctests
'
,
'
fileservice
'
);
let
testDir
:
string
;
...
...
@@ -39,7 +39,7 @@ suite('FileService', () => {
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
return
pfs
.
copy
(
sourceDir
,
testDir
).
then
(()
=>
{
service
=
new
FileService
(
service
=
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
testDir
,
toWorkspaceFolders
([{
path
:
testDir
}]))),
TestEnvironmentService
,
...
...
@@ -382,7 +382,7 @@ suite('FileService', () => {
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
const
_service
=
new
FileService
(
const
_service
=
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
_testDir
,
toWorkspaceFolders
([{
path
:
_testDir
}]))),
TestEnvironmentService
,
...
...
@@ -424,7 +424,7 @@ suite('FileService', () => {
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
const
_service
=
new
FileService
(
const
_service
=
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
_testDir
,
toWorkspaceFolders
([{
path
:
_testDir
}]))),
TestEnvironmentService
,
...
...
@@ -455,7 +455,7 @@ suite('FileService', () => {
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
const
_service
=
new
FileService
(
const
_service
=
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
_testDir
,
toWorkspaceFolders
([{
path
:
_testDir
}]))),
TestEnvironmentService
,
...
...
src/vs/workbench/services/keybinding/test/electron-browser/keybindingEditing.test.ts
浏览文件 @
9f0e79e9
...
...
@@ -35,7 +35,7 @@ import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtil
import
{
IWorkspaceContextService
,
Workspace
,
toWorkspaceFolders
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IBackupFileService
}
from
'
vs/workbench/services/backup/common/backup
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
Legacy
FileService
}
from
'
vs/workbench/services/files/node/fileService
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
KeybindingsEditingService
}
from
'
vs/workbench/services/keybinding/common/keybindingEditing
'
;
import
{
ITextFileService
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
@@ -84,7 +84,7 @@ suite('KeybindingsEditing', () => {
instantiationService
.
stub
(
IModelService
,
instantiationService
.
createInstance
(
ModelServiceImpl
));
const
fileService
=
new
FileService2
(
new
NullLogService
());
fileService
.
registerProvider
(
Schemas
.
file
,
new
DiskFileSystemProvider
(
new
NullLogService
()));
fileService
.
setLegacyService
(
new
FileService
(
fileService
.
setLegacyService
(
new
Legacy
FileService
(
fileService
,
new
TestContextService
(
new
Workspace
(
testDir
,
toWorkspaceFolders
([{
path
:
testDir
}]))),
TestEnvironmentService
,
...
...
src/vs/workbench/services/output/common/outputChannelModel.ts
浏览文件 @
9f0e79e9
...
...
@@ -129,6 +129,7 @@ export abstract class AbstractFileOutputChannelModel extends Disposable implemen
}
}
// TODO@ben see if new watchers can cope with spdlog and avoid polling then
class
OutputFileListener
extends
Disposable
{
private
readonly
_onDidContentChange
=
new
Emitter
<
number
|
undefined
>
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录