Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
adf73b89
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,发现更多精彩内容 >>
提交
adf73b89
编写于
7月 24, 2017
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#29462 IConfigurationService.keys
- Provide folder specific keys
上级
4e6ee69a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
13 deletion
+17
-13
src/vs/platform/configuration/common/configuration.ts
src/vs/platform/configuration/common/configuration.ts
+6
-3
src/vs/platform/configuration/node/configurationService.ts
src/vs/platform/configuration/node/configurationService.ts
+4
-4
src/vs/platform/configuration/test/common/testConfigurationService.ts
...orm/configuration/test/common/testConfigurationService.ts
+2
-1
src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts
.../telemetry/test/electron-browser/telemetryService.test.ts
+1
-1
src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts
...rminal/test/electron-browser/terminalConfigHelper.test.ts
+1
-1
src/vs/workbench/services/configuration/node/configuration.ts
...vs/workbench/services/configuration/node/configuration.ts
+2
-2
src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts
...onResolver/test/node/configurationResolverService.test.ts
+1
-1
未找到文件。
src/vs/platform/configuration/common/configuration.ts
浏览文件 @
adf73b89
...
...
@@ -43,7 +43,7 @@ export interface IConfigurationService {
* Returns the defined keys of configurations in the different scopes
* the key is defined.
*/
keys
():
IConfigurationKeys
;
keys
(
overrides
?:
IConfigurationOverrides
):
IConfigurationKeys
;
/**
* Similar to #getConfiguration() but ensures that the latest configuration
...
...
@@ -91,6 +91,7 @@ export interface IConfigurationKeys {
default
:
string
[];
user
:
string
[];
workspace
:
string
[];
folder
:
string
[];
}
/**
...
...
@@ -268,11 +269,13 @@ export class Configuration<T> {
};
}
keys
():
IConfigurationKeys
{
keys
(
overrides
:
IConfigurationOverrides
=
{}):
IConfigurationKeys
{
const
folderConfigurationModel
=
this
.
getFolderConfigurationModelForResource
(
overrides
.
resource
);
return
{
default
:
this
.
_defaults
.
keys
,
user
:
this
.
_user
.
keys
,
workspace
:
this
.
_workspaceConfiguration
.
keys
workspace
:
this
.
_workspaceConfiguration
.
keys
,
folder
:
folderConfigurationModel
?
folderConfigurationModel
.
keys
:
[]
};
}
...
...
src/vs/platform/configuration/node/configurationService.ts
浏览文件 @
adf73b89
...
...
@@ -72,12 +72,12 @@ export class ConfigurationService<T> extends Disposable implements IConfiguratio
return
this
.
configuration
().
getValue
<
C
>
(
section
,
options
);
}
public
lookup
<
C
>
(
key
:
string
,
o
ption
s
?:
IConfigurationOverrides
):
IConfigurationValue
<
C
>
{
return
this
.
configuration
().
lookup
<
C
>
(
key
,
o
ption
s
);
public
lookup
<
C
>
(
key
:
string
,
o
verride
s
?:
IConfigurationOverrides
):
IConfigurationValue
<
C
>
{
return
this
.
configuration
().
lookup
<
C
>
(
key
,
o
verride
s
);
}
public
keys
():
IConfigurationKeys
{
return
this
.
configuration
().
keys
();
public
keys
(
overrides
?:
IConfigurationOverrides
):
IConfigurationKeys
{
return
this
.
configuration
().
keys
(
overrides
);
}
public
values
<
V
>
():
IConfigurationValues
{
...
...
src/vs/platform/configuration/test/common/testConfigurationService.ts
浏览文件 @
adf73b89
...
...
@@ -50,7 +50,8 @@ export class TestConfigurationService extends EventEmitter implements IConfigura
return
{
default
:
getConfigurationKeys
(),
user
:
Object
.
keys
(
this
.
configuration
),
workspace
:
[]
workspace
:
[],
folder
:
[]
};
}
...
...
src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts
浏览文件 @
adf73b89
...
...
@@ -696,7 +696,7 @@ suite('TelemetryService', () => {
folder
:
null
};
},
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
};
},
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
,
folder
:
[]
};
},
values
()
{
return
{};
},
onDidUpdateConfiguration
:
emitter
.
event
});
...
...
src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts
浏览文件 @
adf73b89
...
...
@@ -19,7 +19,7 @@ class MockConfigurationService implements IConfigurationService {
public
constructor
(
private
configuration
:
any
=
{})
{
}
public
reloadConfiguration
<
T
>
(
section
?:
string
):
TPromise
<
T
>
{
return
TPromise
.
as
(
this
.
getConfiguration
());
}
public
lookup
<
T
>
(
key
:
string
,
overrides
?:
IConfigurationOverrides
):
IConfigurationValue
<
T
>
{
return
{
value
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
default
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
user
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
workspace
:
void
0
,
folder
:
void
0
};
}
public
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
};
}
public
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
,
folder
:
[]
};
}
public
values
()
{
return
{};
}
public
getConfiguration
():
any
{
return
this
.
configuration
;
}
public
getConfigurationData
():
any
{
return
null
;
}
...
...
src/vs/workbench/services/configuration/node/configuration.ts
浏览文件 @
adf73b89
...
...
@@ -256,8 +256,8 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat
return
this
.
_configuration
.
lookup
<
C
>
(
key
,
overrides
);
}
public
keys
():
IConfigurationKeys
{
return
this
.
_configuration
.
keys
();
public
keys
(
overrides
?:
IConfigurationOverrides
):
IConfigurationKeys
{
return
this
.
_configuration
.
keys
(
overrides
);
}
public
values
<
V
>
():
IConfigurationValues
{
...
...
src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts
浏览文件 @
adf73b89
...
...
@@ -343,7 +343,7 @@ class MockConfigurationService implements IConfigurationService {
public
constructor
(
private
configuration
:
any
=
{})
{
}
public
reloadConfiguration
<
T
>
(
section
?:
string
):
TPromise
<
T
>
{
return
TPromise
.
as
(
this
.
getConfiguration
());
}
public
lookup
<
T
>
(
key
:
string
,
overrides
?:
IConfigurationOverrides
):
IConfigurationValue
<
T
>
{
return
{
value
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
default
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
user
:
getConfigurationValue
<
T
>
(
this
.
getConfiguration
(),
key
),
workspace
:
void
0
,
folder
:
void
0
};
}
public
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
};
}
public
keys
()
{
return
{
default
:
[],
user
:
[],
workspace
:
[]
,
folder
:
[]
};
}
public
values
()
{
return
{};
}
public
getConfiguration
():
any
{
return
this
.
configuration
;
}
public
getConfigurationData
():
any
{
return
null
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录