Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
041a5c3b
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
041a5c3b
编写于
1月 11, 2021
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tests - do not use file scheme
上级
f92251d8
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
75 addition
and
71 deletion
+75
-71
src/vs/workbench/electron-browser/desktop.main.ts
src/vs/workbench/electron-browser/desktop.main.ts
+1
-1
src/vs/workbench/services/configuration/electron-browser/configurationCache.ts
...ices/configuration/electron-browser/configurationCache.ts
+4
-6
src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts
...test/electron-browser/configurationEditingService.test.ts
+1
-1
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
...ration/test/electron-browser/configurationService.test.ts
+69
-63
未找到文件。
src/vs/workbench/electron-browser/desktop.main.ts
浏览文件 @
041a5c3b
...
...
@@ -393,7 +393,7 @@ class DesktopMain extends Disposable {
}
private
async
createWorkspaceService
(
payload
:
IWorkspaceInitializationPayload
,
fileService
:
FileService
,
remoteAgentService
:
IRemoteAgentService
,
uriIdentityService
:
IUriIdentityService
,
logService
:
ILogService
):
Promise
<
WorkspaceService
>
{
const
workspaceService
=
new
WorkspaceService
({
remoteAuthority
:
this
.
environmentService
.
remoteAuthority
,
configurationCache
:
new
ConfigurationCache
(
this
.
environmentService
,
fileService
)
},
this
.
environmentService
,
fileService
,
remoteAgentService
,
uriIdentityService
,
logService
);
const
workspaceService
=
new
WorkspaceService
({
remoteAuthority
:
this
.
environmentService
.
remoteAuthority
,
configurationCache
:
new
ConfigurationCache
(
URI
.
file
(
this
.
environmentService
.
userDataPath
)
,
fileService
)
},
this
.
environmentService
,
fileService
,
remoteAgentService
,
uriIdentityService
,
logService
);
try
{
await
workspaceService
.
initialize
(
payload
);
...
...
src/vs/workbench/services/configuration/electron-browser/configurationCache.ts
浏览文件 @
041a5c3b
...
...
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
join
}
from
'
vs/base/common/path
'
;
import
{
INativeWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/electron-sandbox/environmentService
'
;
import
{
IConfigurationCache
,
ConfigurationKey
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
...
...
@@ -16,7 +14,7 @@ export class ConfigurationCache implements IConfigurationCache {
private
readonly
cachedConfigurations
:
Map
<
string
,
CachedConfiguration
>
=
new
Map
<
string
,
CachedConfiguration
>
();
constructor
(
private
readonly
environmentService
:
INativeWorkbenchEnvironmentService
,
private
readonly
fileService
:
IFileService
)
{
constructor
(
private
readonly
cacheHome
:
URI
,
private
readonly
fileService
:
IFileService
)
{
}
needsCaching
(
resource
:
URI
):
boolean
{
...
...
@@ -40,7 +38,7 @@ export class ConfigurationCache implements IConfigurationCache {
const
k
=
`
${
type
}
:
${
key
}
`
;
let
cachedConfiguration
=
this
.
cachedConfigurations
.
get
(
k
);
if
(
!
cachedConfiguration
)
{
cachedConfiguration
=
new
CachedConfiguration
({
type
,
key
},
this
.
environmentServic
e
,
this
.
fileService
);
cachedConfiguration
=
new
CachedConfiguration
({
type
,
key
},
this
.
cacheHom
e
,
this
.
fileService
);
this
.
cachedConfigurations
.
set
(
k
,
cachedConfiguration
);
}
return
cachedConfiguration
;
...
...
@@ -56,10 +54,10 @@ class CachedConfiguration {
constructor
(
{
type
,
key
}:
ConfigurationKey
,
environmentService
:
INativeWorkbenchEnvironmentService
,
cacheHome
:
URI
,
private
readonly
fileService
:
IFileService
)
{
this
.
cachedConfigurationFolderResource
=
URI
.
file
(
join
(
environmentService
.
userDataPath
,
'
CachedConfigurations
'
,
type
,
key
)
);
this
.
cachedConfigurationFolderResource
=
joinPath
(
cacheHome
,
'
CachedConfigurations
'
,
type
,
key
);
this
.
cachedConfigurationFileResource
=
joinPath
(
this
.
cachedConfigurationFolderResource
,
type
===
'
workspaces
'
?
'
workspace.json
'
:
'
configuration.json
'
);
}
...
...
src/vs/workbench/services/configuration/test/electron-browser/configurationEditingService.test.ts
浏览文件 @
041a5c3b
...
...
@@ -99,7 +99,7 @@ suite('ConfigurationEditingService', () => {
disposables
.
add
(
fileService
.
registerProvider
(
Schemas
.
userData
,
disposables
.
add
(
new
FileUserDataProvider
(
Schemas
.
file
,
fileSystemProvider
,
Schemas
.
userData
,
logService
))));
instantiationService
.
stub
(
IFileService
,
fileService
);
instantiationService
.
stub
(
IRemoteAgentService
,
remoteAgentService
);
workspaceService
=
disposables
.
add
(
new
WorkspaceService
({
configurationCache
:
new
ConfigurationCache
(
environmentService
,
fileService
)
},
environmentService
,
fileService
,
remoteAgentService
,
new
UriIdentityService
(
fileService
),
new
NullLogService
()));
workspaceService
=
disposables
.
add
(
new
WorkspaceService
({
configurationCache
:
new
ConfigurationCache
(
URI
.
file
(
environmentService
.
userDataPath
)
,
fileService
)
},
environmentService
,
fileService
,
remoteAgentService
,
new
UriIdentityService
(
fileService
),
new
NullLogService
()));
instantiationService
.
stub
(
IWorkspaceContextService
,
workspaceService
);
await
workspaceService
.
initialize
({
folder
:
workspaceFolder
,
id
:
createHash
(
'
md5
'
).
update
(
workspaceFolder
.
toString
()).
digest
(
'
hex
'
)
});
...
...
src/vs/workbench/services/configuration/test/electron-browser/configurationService.test.ts
浏览文件 @
041a5c3b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录