Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e1e421f1
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,发现更多精彩内容 >>
提交
e1e421f1
编写于
7月 12, 2019
作者:
P
Pine Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add in listItemType
上级
1aa47639
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
14 addition
and
8 deletion
+14
-8
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
.../workbench/contrib/preferences/browser/settingsEditor2.ts
+1
-1
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
+2
-2
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
...rkbench/contrib/preferences/browser/settingsTreeModels.ts
+2
-2
src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts
.../workbench/contrib/preferences/browser/settingsWidgets.ts
+1
-1
src/vs/workbench/services/preferences/common/preferences.ts
src/vs/workbench/services/preferences/common/preferences.ts
+2
-1
src/vs/workbench/services/preferences/common/preferencesModels.ts
...orkbench/services/preferences/common/preferencesModels.ts
+6
-1
未找到文件。
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
浏览文件 @
e1e421f1
...
...
@@ -79,7 +79,7 @@ export class SettingsEditor2 extends BaseEditor {
return
false
;
}
return
type
===
SettingValueType
.
Enum
||
type
===
SettingValueType
.
Array
||
type
===
SettingValueType
.
ListOfString
||
type
===
SettingValueType
.
Complex
||
type
===
SettingValueType
.
Boolean
||
type
===
SettingValueType
.
Exclude
;
...
...
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
浏览文件 @
e1e421f1
...
...
@@ -672,7 +672,7 @@ export class SettingArrayRenderer extends AbstractSettingRenderer implements ITr
renderTemplate
(
container
:
HTMLElement
):
ISettingExcludeItemTemplate
{
const
common
=
this
.
renderCommonTemplate
(
null
,
container
,
'
exclude
'
);
const
excludeWidget
=
this
.
_instantiationService
.
createInstance
(
ExcludeSettingWidget
,
'
array
-of-string
'
,
common
.
controlElement
);
const
excludeWidget
=
this
.
_instantiationService
.
createInstance
(
ExcludeSettingWidget
,
'
list
-of-string
'
,
common
.
controlElement
);
excludeWidget
.
domNode
.
classList
.
add
(
AbstractSettingRenderer
.
CONTROL_CLASS
);
common
.
toDispose
.
push
(
excludeWidget
);
...
...
@@ -1352,7 +1352,7 @@ class SettingsTreeDelegate implements IListVirtualDelegate<SettingsTreeGroupChil
return
SETTINGS_ENUM_TEMPLATE_ID
;
}
if
(
element
.
valueType
===
SettingValueType
.
Array
)
{
if
(
element
.
valueType
===
SettingValueType
.
ListOfString
)
{
return
SETTINGS_ARRAY_TEMPLATE_ID
;
}
...
...
src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
浏览文件 @
e1e421f1
...
...
@@ -193,8 +193,8 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
this
.
valueType
=
SettingValueType
.
Number
;
}
else
if
(
this
.
setting
.
type
===
'
boolean
'
)
{
this
.
valueType
=
SettingValueType
.
Boolean
;
}
else
if
(
this
.
setting
.
type
===
'
array
'
)
{
this
.
valueType
=
SettingValueType
.
Array
;
}
else
if
(
this
.
setting
.
type
===
'
array
'
&&
this
.
setting
.
listItemType
===
'
string
'
)
{
this
.
valueType
=
SettingValueType
.
ListOfString
;
}
else
if
(
isArray
(
this
.
setting
.
type
)
&&
this
.
setting
.
type
.
indexOf
(
SettingValueType
.
Null
)
>
-
1
&&
this
.
setting
.
type
.
length
===
2
)
{
if
(
this
.
setting
.
type
.
indexOf
(
SettingValueType
.
Integer
)
>
-
1
)
{
this
.
valueType
=
SettingValueType
.
NullableInteger
;
...
...
src/vs/workbench/contrib/preferences/browser/settingsWidgets.ts
浏览文件 @
e1e421f1
...
...
@@ -212,7 +212,7 @@ export class ExcludeSettingWidget extends Disposable {
}
constructor
(
private
type
:
'
exclude
'
|
'
array
-of-string
'
,
private
type
:
'
exclude
'
|
'
list
-of-string
'
,
private
container
:
HTMLElement
,
@
IThemeService
private
readonly
themeService
:
IThemeService
,
@
IContextViewService
private
readonly
contextViewService
:
IContextViewService
,
...
...
src/vs/workbench/services/preferences/common/preferences.ts
浏览文件 @
e1e421f1
...
...
@@ -25,7 +25,7 @@ export enum SettingValueType {
Integer
=
'
integer
'
,
Number
=
'
number
'
,
Boolean
=
'
boolean
'
,
Array
=
'
array
'
,
ListOfString
=
'
list-of-string
'
,
Exclude
=
'
exclude
'
,
Complex
=
'
complex
'
,
NullableInteger
=
'
nullable-integer
'
,
...
...
@@ -62,6 +62,7 @@ export interface ISetting {
scope
?:
ConfigurationScope
;
type
?:
string
|
string
[];
listItemType
?:
string
;
enum
?:
string
[];
enumDescriptions
?:
string
[];
enumDescriptionsAreMarkdown
?:
boolean
;
...
...
src/vs/workbench/services/preferences/common/preferencesModels.ts
浏览文件 @
e1e421f1
...
...
@@ -22,7 +22,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
EditorModel
}
from
'
vs/workbench/common/editor
'
;
import
{
IFilterMetadata
,
IFilterResult
,
IGroupFilter
,
IKeybindingsEditorModel
,
ISearchResultGroup
,
ISetting
,
ISettingMatch
,
ISettingMatcher
,
ISettingsEditorModel
,
ISettingsGroup
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
withNullAsUndefined
}
from
'
vs/base/common/types
'
;
import
{
withNullAsUndefined
,
isArray
}
from
'
vs/base/common/types
'
;
export
const
nullRange
:
IRange
=
{
startLineNumber
:
-
1
,
startColumn
:
-
1
,
endLineNumber
:
-
1
,
endColumn
:
-
1
};
export
function
isNullRange
(
range
:
IRange
):
boolean
{
return
range
.
startLineNumber
===
-
1
&&
range
.
startColumn
===
-
1
&&
range
.
endLineNumber
===
-
1
&&
range
.
endColumn
===
-
1
;
}
...
...
@@ -613,6 +613,10 @@ export class DefaultSettings extends Disposable {
const
value
=
prop
.
default
;
const
description
=
(
prop
.
description
||
prop
.
markdownDescription
||
''
).
split
(
'
\n
'
);
const
overrides
=
OVERRIDE_PROPERTY_PATTERN
.
test
(
key
)
?
this
.
parseOverrideSettings
(
prop
.
default
)
:
[];
const
listItemType
=
prop
.
type
===
'
array
'
&&
prop
.
items
&&
!
isArray
(
prop
.
items
)
&&
prop
.
items
.
type
&&
!
isArray
(
prop
.
items
.
type
)
?
prop
.
items
.
type
:
undefined
;
result
.
push
({
key
,
value
,
...
...
@@ -625,6 +629,7 @@ export class DefaultSettings extends Disposable {
overrides
,
scope
:
prop
.
scope
,
type
:
prop
.
type
,
listItemType
,
enum
:
prop
.
enum
,
enumDescriptions
:
prop
.
enumDescriptions
||
prop
.
markdownEnumDescriptions
,
enumDescriptionsAreMarkdown
:
!
prop
.
enumDescriptions
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录