Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
deec2133
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,发现更多精彩内容 >>
提交
deec2133
编写于
2月 14, 2018
作者:
R
Ramya Achutha Rao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Fix #41571" as it breaks tests
This reverts commit
00262fb3
.
上级
cf360e00
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
2 addition
and
17 deletion
+2
-17
src/vs/workbench/services/configuration/node/configuration.ts
...vs/workbench/services/configuration/node/configuration.ts
+2
-4
src/vs/workbench/services/configuration/test/node/configurationService.test.ts
...ices/configuration/test/node/configurationService.test.ts
+0
-13
未找到文件。
src/vs/workbench/services/configuration/node/configuration.ts
浏览文件 @
deec2133
...
...
@@ -92,13 +92,10 @@ export class WorkspaceConfiguration extends Disposable {
this
.
_workspaceConfigPath
=
workspaceConfigPath
;
this
.
stopListeningToWatcher
();
return
new
TPromise
<
void
>
((
c
,
e
)
=>
{
const
defaultConfig
=
new
WorkspaceConfigurationModelParser
(
this
.
_workspaceConfigPath
.
fsPath
);
defaultConfig
.
parse
(
JSON
.
stringify
({
folders
:
[]
}
as
IStoredWorkspace
,
null
,
'
\t
'
));
if
(
this
.
_workspaceConfigurationWatcher
)
{
this
.
stopListeningToWatcher
();
this
.
_workspaceConfigurationWatcher
.
dispose
();
}
this
.
_workspaceConfigurationWatcher
=
new
ConfigWatcher
(
this
.
_workspaceConfigPath
.
fsPath
,
{
changeBufferDelay
:
300
,
onError
:
error
=>
errors
.
onUnexpectedError
(
error
),
...
...
@@ -147,6 +144,7 @@ export class WorkspaceConfiguration extends Disposable {
}
private
listenToWatcher
()
{
this
.
_workspaceConfigurationWatcherDisposables
.
push
(
this
.
_workspaceConfigurationWatcher
);
this
.
_workspaceConfigurationWatcher
.
onDidUpdateConfiguration
(()
=>
this
.
_onDidUpdateConfiguration
.
fire
(),
this
,
this
.
_workspaceConfigurationWatcherDisposables
);
}
...
...
src/vs/workbench/services/configuration/test/node/configurationService.test.ts
浏览文件 @
deec2133
...
...
@@ -274,19 +274,6 @@ suite('WorkspaceContextService - Workspace', () => {
});
});
test
(
'
remove folders and add them back by writing into the file
'
,
done
=>
{
const
folders
=
testObject
.
getWorkspace
().
folders
;
return
testObject
.
removeFolders
([
folders
[
0
].
uri
])
.
then
(()
=>
{
testObject
.
onDidChangeWorkspaceFolders
(
actual
=>
{
assert
.
deepEqual
(
actual
.
added
.
map
(
r
=>
r
.
uri
.
toString
()),
[
folders
[
0
].
uri
.
toString
()]);
done
();
});
const
workspace
=
{
folders
:
[{
path
:
folders
[
0
].
uri
.
fsPath
},
{
path
:
folders
[
1
].
uri
.
fsPath
}]
};
fs
.
writeFileSync
(
testObject
.
getWorkspace
().
configuration
.
fsPath
,
JSON
.
stringify
(
workspace
,
null
,
'
\t
'
));
});
});
test
(
'
update folders (remove last and add to end)
'
,
()
=>
{
const
target
=
sinon
.
spy
();
testObject
.
onDidChangeWorkspaceFolders
(
target
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录