Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a405b0c3
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
a405b0c3
编写于
1月 27, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass in IRemoteAgentService to RemoteFileSystemProvider
上级
c474863a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
src/vs/workbench/browser/web.main.ts
src/vs/workbench/browser/web.main.ts
+2
-4
src/vs/workbench/electron-browser/desktop.main.ts
src/vs/workbench/electron-browser/desktop.main.ts
+2
-4
src/vs/workbench/services/remote/common/remoteAgentFileSystemChannel.ts
...ch/services/remote/common/remoteAgentFileSystemChannel.ts
+7
-3
未找到文件。
src/vs/workbench/browser/web.main.ts
浏览文件 @
a405b0c3
...
...
@@ -10,8 +10,7 @@ import { ILogService, ConsoleLogService, MultiplexLogService } from 'vs/platform
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
BrowserWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/browser/environmentService
'
;
import
{
Workbench
}
from
'
vs/workbench/browser/workbench
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
REMOTE_FILE_SYSTEM_CHANNEL_NAME
,
RemoteFileSystemProvider
}
from
'
vs/platform/remote/common/remoteAgentFileSystemChannel
'
;
import
{
RemoteFileSystemProvider
}
from
'
vs/workbench/services/remote/common/remoteAgentFileSystemChannel
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/productService
'
;
import
product
from
'
vs/platform/product/common/product
'
;
...
...
@@ -244,8 +243,7 @@ class BrowserMain extends Disposable {
if
(
connection
)
{
// Remote file system
const
channel
=
connection
.
getChannel
<
IChannel
>
(
REMOTE_FILE_SYSTEM_CHANNEL_NAME
);
const
remoteFileSystemProvider
=
this
.
_register
(
new
RemoteFileSystemProvider
(
channel
,
remoteAgentService
.
getEnvironment
()));
const
remoteFileSystemProvider
=
this
.
_register
(
new
RemoteFileSystemProvider
(
remoteAgentService
));
fileService
.
registerProvider
(
Schemas
.
vscodeRemote
,
remoteFileSystemProvider
);
if
(
!
this
.
configuration
.
userDataProvider
)
{
...
...
src/vs/workbench/electron-browser/desktop.main.ts
浏览文件 @
a405b0c3
...
...
@@ -42,8 +42,7 @@ import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteA
import
{
FileService
}
from
'
vs/platform/files/common/fileService
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
DiskFileSystemProvider
}
from
'
vs/platform/files/electron-browser/diskFileSystemProvider
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
REMOTE_FILE_SYSTEM_CHANNEL_NAME
,
RemoteFileSystemProvider
}
from
'
vs/platform/remote/common/remoteAgentFileSystemChannel
'
;
import
{
RemoteFileSystemProvider
}
from
'
vs/workbench/services/remote/common/remoteAgentFileSystemChannel
'
;
import
{
ConfigurationCache
}
from
'
vs/workbench/services/configuration/node/configurationCache
'
;
import
{
SpdLogService
}
from
'
vs/platform/log/node/spdlogService
'
;
import
{
SignService
}
from
'
vs/platform/sign/node/signService
'
;
...
...
@@ -216,8 +215,7 @@ class DesktopMain extends Disposable {
const
connection
=
remoteAgentService
.
getConnection
();
if
(
connection
)
{
const
channel
=
connection
.
getChannel
<
IChannel
>
(
REMOTE_FILE_SYSTEM_CHANNEL_NAME
);
const
remoteFileSystemProvider
=
this
.
_register
(
new
RemoteFileSystemProvider
(
channel
,
remoteAgentService
.
getEnvironment
()));
const
remoteFileSystemProvider
=
this
.
_register
(
new
RemoteFileSystemProvider
(
remoteAgentService
));
fileService
.
registerProvider
(
Schemas
.
vscodeRemote
,
remoteFileSystemProvider
);
}
...
...
src/vs/
platform
/remote/common/remoteAgentFileSystemChannel.ts
→
src/vs/
workbench/services
/remote/common/remoteAgentFileSystemChannel.ts
浏览文件 @
a405b0c3
...
...
@@ -10,7 +10,7 @@ import { generateUuid } from 'vs/base/common/uuid';
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
FileChangeType
,
FileDeleteOptions
,
FileOverwriteOptions
,
FileSystemProviderCapabilities
,
FileType
,
IFileChange
,
IStat
,
IWatchOptions
,
FileOpenOptions
,
IFileSystemProviderWithFileReadWriteCapability
,
FileWriteOptions
,
IFileSystemProviderWithFileReadStreamCapability
,
IFileSystemProviderWithFileFolderCopyCapability
,
FileReadStreamOptions
,
IFileSystemProviderWithOpenReadWriteCloseCapability
}
from
'
vs/platform/files/common/files
'
;
import
{
VSBuffer
}
from
'
vs/base/common/buffer
'
;
import
{
IRemoteAgent
Environment
}
from
'
vs/platform/remote/common/remoteAgentEnvironment
'
;
import
{
IRemoteAgent
Service
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
import
{
OperatingSystem
}
from
'
vs/base/common/platform
'
;
import
{
newWriteableStream
,
ReadableStreamEvents
,
ReadableStreamEventPayload
}
from
'
vs/base/common/stream
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
...
...
@@ -31,6 +31,7 @@ export class RemoteFileSystemProvider extends Disposable implements
IFileSystemProviderWithFileFolderCopyCapability
{
private
readonly
session
:
string
=
generateUuid
();
private
readonly
channel
:
IChannel
;
private
readonly
_onDidChange
=
this
.
_register
(
new
Emitter
<
readonly
IFileChange
[]
>
());
readonly
onDidChangeFile
=
this
.
_onDidChange
.
event
;
...
...
@@ -44,11 +45,14 @@ export class RemoteFileSystemProvider extends Disposable implements
private
_capabilities
!
:
FileSystemProviderCapabilities
;
get
capabilities
():
FileSystemProviderCapabilities
{
return
this
.
_capabilities
;
}
constructor
(
private
readonly
channel
:
IChannel
,
environment
:
Promise
<
IRemoteAgentEnvironment
|
null
>
)
{
constructor
(
remoteAgentService
:
IRemoteAgentService
)
{
super
();
const
connection
=
remoteAgentService
.
getConnection
()
!
;
this
.
channel
=
connection
.
getChannel
<
IChannel
>
(
REMOTE_FILE_SYSTEM_CHANNEL_NAME
);
this
.
setCaseSensitive
(
true
);
environment
.
then
(
remoteAgentEnvironment
=>
this
.
setCaseSensitive
(
!!
(
remoteAgentEnvironment
&&
remoteAgentEnvironment
.
os
===
OperatingSystem
.
Linux
)));
remoteAgentService
.
getEnvironment
()
.
then
(
remoteAgentEnvironment
=>
this
.
setCaseSensitive
(
!!
(
remoteAgentEnvironment
&&
remoteAgentEnvironment
.
os
===
OperatingSystem
.
Linux
)));
this
.
registerListeners
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录