Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7600f66f
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,发现更多精彩内容 >>
提交
7600f66f
编写于
9月 12, 2018
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
46e48e70
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
15 deletion
+18
-15
src/vs/workbench/parts/preferences/browser/settingsEditor2.ts
...vs/workbench/parts/preferences/browser/settingsEditor2.ts
+7
-7
src/vs/workbench/parts/preferences/browser/settingsTree.ts
src/vs/workbench/parts/preferences/browser/settingsTree.ts
+11
-8
未找到文件。
src/vs/workbench/parts/preferences/browser/settingsEditor2.ts
浏览文件 @
7600f66f
...
...
@@ -221,8 +221,8 @@ export class SettingsEditor2 extends BaseEditor {
this
.
layoutTrees
(
dimension
);
le
t
innerWidth
=
dimension
.
width
-
24
*
2
;
// 24px padding on left and right
le
t
monacoWidth
=
(
innerWidth
>
1000
?
1000
:
innerWidth
)
-
10
;
cons
t
innerWidth
=
dimension
.
width
-
24
*
2
;
// 24px padding on left and right
cons
t
monacoWidth
=
(
innerWidth
>
1000
?
1000
:
innerWidth
)
-
10
;
this
.
searchWidget
.
layout
({
height
:
20
,
width
:
monacoWidth
});
DOM
.
toggleClass
(
this
.
rootElement
,
'
narrow
'
,
dimension
.
width
<
600
);
...
...
@@ -293,7 +293,7 @@ export class SettingsEditor2 extends BaseEditor {
const
searchContainer
=
DOM
.
append
(
this
.
headerContainer
,
$
(
'
.search-container
'
));
le
t
searchBoxLabel
=
localize
(
'
SearchSettings.AriaLabel
'
,
"
Search settings
"
);
cons
t
searchBoxLabel
=
localize
(
'
SearchSettings.AriaLabel
'
,
"
Search settings
"
);
this
.
searchWidget
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
SuggestEnabledInput
,
`
${
SettingsEditor2
.
ID
}
.searchbox`
,
searchContainer
,
{
triggerCharacters
:
[
'
@
'
],
provideResults
:
(
query
:
string
)
=>
{
...
...
@@ -792,7 +792,7 @@ export class SettingsEditor2 extends BaseEditor {
// Warn for settings not included in layout
if
(
settingsResult
.
leftoverSettings
.
size
&&
!
this
.
hasWarnedMissingSettings
)
{
le
t
settingKeyList
=
[];
cons
t
settingKeyList
=
[];
settingsResult
.
leftoverSettings
.
forEach
(
s
=>
{
settingKeyList
.
push
(
s
.
key
);
});
...
...
@@ -985,9 +985,9 @@ export class SettingsEditor2 extends BaseEditor {
const
fullResult
:
ISearchResult
=
{
filterMatches
:
[]
};
for
(
le
t
g
of
this
.
defaultSettingsEditorModel
.
settingsGroups
.
slice
(
1
))
{
for
(
le
t
sect
of
g
.
sections
)
{
for
(
le
t
setting
of
sect
.
settings
)
{
for
(
cons
t
g
of
this
.
defaultSettingsEditorModel
.
settingsGroups
.
slice
(
1
))
{
for
(
cons
t
sect
of
g
.
sections
)
{
for
(
cons
t
setting
of
sect
.
settings
)
{
fullResult
.
filterMatches
.
push
({
setting
,
matches
:
[],
score
:
0
});
}
}
...
...
src/vs/workbench/parts/preferences/browser/settingsTree.ts
浏览文件 @
7600f66f
...
...
@@ -158,9 +158,9 @@ function settingMatches(s: ISetting, pattern: string): boolean {
function
getFlatSettings
(
settingsGroups
:
ISettingsGroup
[])
{
const
result
:
Set
<
ISetting
>
=
new
Set
();
for
(
le
t
group
of
settingsGroups
)
{
for
(
le
t
section
of
group
.
sections
)
{
for
(
le
t
s
of
section
.
settings
)
{
for
(
cons
t
group
of
settingsGroups
)
{
for
(
cons
t
section
of
group
.
sections
)
{
for
(
cons
t
s
of
section
.
settings
)
{
if
(
!
s
.
overrides
||
!
s
.
overrides
.
length
)
{
result
.
add
(
s
);
}
...
...
@@ -877,7 +877,7 @@ export class SettingsRenderer implements ITreeRenderer {
common
.
toDispose
.
push
(
excludeWidget
.
onDidChangeExclude
(
e
=>
{
if
(
template
.
context
)
{
le
t
newValue
=
{
...
template
.
context
.
scopeValue
};
cons
t
newValue
=
{
...
template
.
context
.
scopeValue
};
// first delete the existing entry, if present
if
(
e
.
originalPattern
)
{
...
...
@@ -1052,7 +1052,7 @@ export class SettingsRenderer implements ITreeRenderer {
}
if
(
element
.
overriddenScopeList
.
length
)
{
le
t
otherOverridesLabel
=
element
.
isConfigured
?
cons
t
otherOverridesLabel
=
element
.
isConfigured
?
localize
(
'
alsoConfiguredIn
'
,
"
Also modified in
"
)
:
localize
(
'
configuredIn
'
,
"
Modified in
"
);
...
...
@@ -1153,6 +1153,7 @@ export class SettingsRenderer implements ITreeRenderer {
}));
const
modifiedText
=
dataElement
.
isConfigured
?
'
Modified
'
:
''
;
// Use ',.' as reader pause
const
label
=
dataElement
.
displayCategory
+
'
'
+
dataElement
.
displayLabel
+
'
,.
'
+
modifiedText
;
const
baseId
=
(
dataElement
.
displayCategory
+
'
_
'
+
dataElement
.
displayLabel
).
replace
(
/ /g
,
'
_
'
).
toLowerCase
();
...
...
@@ -1204,8 +1205,10 @@ export class SettingsRenderer implements ITreeRenderer {
private
renderNumber
(
dataElement
:
SettingsTreeSettingElement
,
template
:
ISettingTextItemTemplate
,
onChange
:
(
value
:
number
)
=>
void
):
void
{
const
modifiedText
=
dataElement
.
isConfigured
?
'
Modified
'
:
''
;
// Use ',.' as reader pause
const
label
=
dataElement
.
displayCategory
+
'
'
+
dataElement
.
displayLabel
+
'
number,.
'
+
modifiedText
;
const
numParseFn
=
(
dataElement
.
valueType
===
'
integer
'
||
dataElement
.
valueType
===
'
nullable-integer
'
)
const
label
=
dataElement
.
displayCategory
+
'
'
+
dataElement
.
displayLabel
+
'
number,.
'
+
modifiedText
;
const
numParseFn
=
(
dataElement
.
valueType
===
'
integer
'
||
dataElement
.
valueType
===
'
nullable-integer
'
)
?
parseInt
:
parseFloat
;
const
nullNumParseFn
=
(
dataElement
.
valueType
===
'
nullable-integer
'
||
dataElement
.
valueType
===
'
nullable-number
'
)
...
...
@@ -1251,11 +1254,11 @@ export class SettingsRenderer implements ITreeRenderer {
function
renderValidations
(
dataElement
:
SettingsTreeSettingElement
,
template
:
ISettingTextItemTemplate
,
calledOnStartup
:
boolean
,
originalAriaLabel
:
string
)
{
if
(
dataElement
.
setting
.
validator
)
{
le
t
errMsg
=
dataElement
.
setting
.
validator
(
template
.
inputBox
.
value
);
cons
t
errMsg
=
dataElement
.
setting
.
validator
(
template
.
inputBox
.
value
);
if
(
errMsg
)
{
DOM
.
addClass
(
template
.
containerElement
,
'
invalid-input
'
);
template
.
validationErrorMessageElement
.
innerText
=
errMsg
;
le
t
validationError
=
localize
(
'
validationError
'
,
"
Validation Error.
"
);
cons
t
validationError
=
localize
(
'
validationError
'
,
"
Validation Error.
"
);
template
.
inputBox
.
inputElement
.
parentElement
.
setAttribute
(
'
aria-label
'
,
[
originalAriaLabel
,
validationError
,
errMsg
].
join
(
'
'
));
if
(
!
calledOnStartup
)
{
ariaAlert
(
validationError
+
'
'
+
errMsg
);
}
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录