Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8d0ce970
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 搜索 >>
提交
8d0ce970
编写于
4月 09, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
schemas - add vscodeRemote
上级
29d9a9a8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
12 deletion
+11
-12
src/vs/base/common/network.ts
src/vs/base/common/network.ts
+2
-0
src/vs/code/electron-main/app.ts
src/vs/code/electron-main/app.ts
+2
-2
src/vs/platform/remote/common/remoteHosts.ts
src/vs/platform/remote/common/remoteHosts.ts
+2
-1
src/vs/workbench/contrib/files/browser/fileCommands.ts
src/vs/workbench/contrib/files/browser/fileCommands.ts
+1
-2
src/vs/workbench/contrib/files/common/files.ts
src/vs/workbench/contrib/files/common/files.ts
+1
-2
src/vs/workbench/electron-browser/main.ts
src/vs/workbench/electron-browser/main.ts
+1
-2
src/vs/workbench/services/textfile/common/textFileService.ts
src/vs/workbench/services/textfile/common/textFileService.ts
+2
-3
未找到文件。
src/vs/base/common/network.ts
浏览文件 @
8d0ce970
...
...
@@ -44,4 +44,6 @@ export namespace Schemas {
export
const
data
:
string
=
'
data
'
;
export
const
command
:
string
=
'
command
'
;
export
const
vscodeRemote
:
string
=
'
vscode-remote
'
;
}
src/vs/code/electron-main/app.ts
浏览文件 @
8d0ce970
...
...
@@ -67,7 +67,7 @@ import { storeBackgroundColor } from 'vs/code/electron-main/theme';
import
{
homedir
}
from
'
os
'
;
import
{
join
,
sep
}
from
'
vs/base/common/path
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
REMOTE_FILE_SYSTEM_CHANNEL_NAME
}
from
'
vs/platform/remote/common/remoteAgentFileSystemChannel
'
;
import
{
ResolvedAuthority
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
SnapUpdateService
}
from
'
vs/platform/update/electron-main/updateService.snap
'
;
...
...
@@ -748,7 +748,7 @@ export class CodeApplication extends Disposable {
}
};
protocol
.
registerBufferProtocol
(
REMOTE_HOST_SCHEME
,
async
(
request
,
callback
)
=>
{
protocol
.
registerBufferProtocol
(
Schemas
.
vscodeRemote
,
async
(
request
,
callback
)
=>
{
if
(
request
.
method
!==
'
GET
'
)
{
return
callback
(
undefined
);
}
...
...
src/vs/platform/remote/common/remoteHosts.ts
浏览文件 @
8d0ce970
...
...
@@ -4,8 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
export
const
REMOTE_HOST_SCHEME
=
'
vscode-remote
'
;
export
const
REMOTE_HOST_SCHEME
=
Schemas
.
vscodeRemote
;
export
function
getRemoteAuthority
(
uri
:
URI
):
string
|
undefined
{
return
uri
.
scheme
===
REMOTE_HOST_SCHEME
?
uri
.
authority
:
undefined
;
...
...
src/vs/workbench/contrib/files/browser/fileCommands.ts
浏览文件 @
8d0ce970
...
...
@@ -41,7 +41,6 @@ import { onUnexpectedError } from 'vs/base/common/errors';
import
{
basename
}
from
'
vs/base/common/resources
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
// Commands
...
...
@@ -140,7 +139,7 @@ function save(
savePromise
=
textFileService
.
save
(
resource
,
options
).
then
(
result
=>
{
if
(
result
)
{
if
(
environmentService
.
configuration
.
remoteAuthority
)
{
return
resource
.
with
({
scheme
:
REMOTE_HOST_SCHEME
});
return
resource
.
with
({
scheme
:
Schemas
.
vscodeRemote
});
}
return
resource
.
with
({
scheme
:
Schemas
.
file
});
...
...
src/vs/workbench/contrib/files/common/files.ts
浏览文件 @
8d0ce970
...
...
@@ -24,7 +24,6 @@ import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsSe
import
{
ExplorerItem
}
from
'
vs/workbench/contrib/files/common/explorerModel
'
;
import
{
once
}
from
'
vs/base/common/functional
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
/**
* Explorer viewlet id.
...
...
@@ -199,7 +198,7 @@ export class FileOnDiskContentProvider implements ITextModelContentProvider {
private
toSavedFileResource
(
resource
:
URI
):
URI
{
if
(
this
.
environmentService
.
configuration
.
remoteAuthority
)
{
return
resource
.
with
({
scheme
:
REMOTE_HOST_SCHEME
});
// assume file on disk is remote
return
resource
.
with
({
scheme
:
Schemas
.
vscodeRemote
});
// assume file on disk is remote
}
return
resource
.
with
({
scheme
:
Schemas
.
file
});
...
...
src/vs/workbench/electron-browser/main.ts
浏览文件 @
8d0ce970
...
...
@@ -46,7 +46,6 @@ import { IFileService } from 'vs/platform/files/common/files';
import
{
DiskFileSystemProvider
}
from
'
vs/workbench/services/files2/electron-browser/diskFileSystemProvider
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
REMOTE_FILE_SYSTEM_CHANNEL_NAME
,
RemoteExtensionsFileSystemProvider
}
from
'
vs/platform/remote/common/remoteAgentFileSystemChannel
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
DefaultConfigurationExportHelper
}
from
'
vs/workbench/services/configuration/node/configurationExportHelper
'
;
import
{
ConfigurationCache
}
from
'
vs/workbench/services/configuration/node/configurationCache
'
;
import
{
ConfigurationFileService
}
from
'
vs/workbench/services/configuration/node/configurationFileService
'
;
...
...
@@ -201,7 +200,7 @@ class CodeRendererMain extends Disposable {
if
(
connection
)
{
const
channel
=
connection
.
getChannel
<
IChannel
>
(
REMOTE_FILE_SYSTEM_CHANNEL_NAME
);
const
remoteFileSystemProvider
=
this
.
_register
(
new
RemoteExtensionsFileSystemProvider
(
channel
,
remoteAgentService
.
getEnvironment
()));
fileService
.
registerProvider
(
REMOTE_HOST_SCHEME
,
remoteFileSystemProvider
);
fileService
.
registerProvider
(
Schemas
.
vscodeRemote
,
remoteFileSystemProvider
);
}
return
this
.
resolveWorkspaceInitializationPayload
(
environmentService
).
then
(
payload
=>
Promise
.
all
([
...
...
src/vs/workbench/services/textfile/common/textFileService.ts
浏览文件 @
8d0ce970
...
...
@@ -32,7 +32,6 @@ import { IModelService } from 'vs/editor/common/services/modelService';
import
{
INotificationService
,
Severity
}
from
'
vs/platform/notification/common/notification
'
;
import
{
isEqualOrParent
,
isEqual
,
joinPath
,
dirname
,
extname
,
basename
}
from
'
vs/base/common/resources
'
;
import
{
posix
}
from
'
vs/base/common/path
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
getConfirmMessage
,
IDialogService
,
IFileDialogService
,
ISaveDialogOptions
,
IConfirmation
}
from
'
vs/platform/dialogs/common/dialogs
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
@@ -615,7 +614,7 @@ export class TextFileService extends Disposable implements ITextFileService {
if
(
path
&&
path
[
0
]
!==
posix
.
sep
)
{
path
=
posix
.
sep
+
path
;
}
return
untitled
.
with
({
scheme
:
REMOTE_HOST_SCHEME
,
authority
,
path
});
return
untitled
.
with
({
scheme
:
Schemas
.
vscodeRemote
,
authority
,
path
});
}
return
untitled
.
with
({
scheme
:
Schemas
.
file
});
}
...
...
@@ -800,7 +799,7 @@ export class TextFileService extends Disposable implements ITextFileService {
private
suggestFileName
(
untitledResource
:
URI
):
URI
{
const
untitledFileName
=
this
.
untitledEditorService
.
suggestFileName
(
untitledResource
);
const
remoteAuthority
=
this
.
environmentService
.
configuration
.
remoteAuthority
;
const
schemeFilter
=
remoteAuthority
?
REMOTE_HOST_SCHEME
:
Schemas
.
file
;
const
schemeFilter
=
remoteAuthority
?
Schemas
.
vscodeRemote
:
Schemas
.
file
;
const
lastActiveFile
=
this
.
historyService
.
getLastActiveFile
(
schemeFilter
);
if
(
lastActiveFile
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录