Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2809ed71
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,发现更多精彩内容 >>
提交
2809ed71
编写于
1月 16, 2018
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Include groupId in copySetting pref telemetry
上级
cbf9ae23
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
17 deletion
+19
-17
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
.../workbench/parts/preferences/browser/preferencesEditor.ts
+3
-3
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
...rkbench/parts/preferences/browser/preferencesRenderers.ts
+16
-14
未找到文件。
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
2809ed71
...
...
@@ -418,7 +418,7 @@ class PreferencesRenderersController extends Disposable {
this
.
_defaultPreferencesRendererDisposables
=
dispose
(
this
.
_defaultPreferencesRendererDisposables
);
if
(
this
.
_defaultPreferencesRenderer
)
{
this
.
_defaultPreferencesRenderer
.
onUpdatePreference
(({
key
,
value
,
source
,
index
})
=>
this
.
_updatePreference
(
key
,
value
,
source
,
index
,
this
.
_editablePreferencesRenderer
),
this
,
this
.
_defaultPreferencesRendererDisposables
);
this
.
_defaultPreferencesRenderer
.
onUpdatePreference
(({
key
,
value
,
source
})
=>
this
.
_updatePreference
(
key
,
value
,
source
,
this
.
_editablePreferencesRenderer
),
this
,
this
.
_defaultPreferencesRendererDisposables
);
this
.
_defaultPreferencesRenderer
.
onFocusPreference
(
preference
=>
this
.
_focusPreference
(
preference
,
this
.
_editablePreferencesRenderer
),
this
,
this
.
_defaultPreferencesRendererDisposables
);
this
.
_defaultPreferencesRenderer
.
onClearFocusPreference
(
preference
=>
this
.
_clearFocus
(
preference
,
this
.
_editablePreferencesRenderer
),
this
,
this
.
_defaultPreferencesRendererDisposables
);
}
...
...
@@ -548,9 +548,9 @@ class PreferencesRenderersController extends Disposable {
}
}
private
_updatePreference
(
key
:
string
,
value
:
any
,
source
:
ISetting
,
index
:
number
,
preferencesRenderer
:
IPreferencesRenderer
<
ISetting
>
):
void
{
private
_updatePreference
(
key
:
string
,
value
:
any
,
source
:
ISetting
,
preferencesRenderer
:
IPreferencesRenderer
<
ISetting
>
):
void
{
if
(
preferencesRenderer
)
{
preferencesRenderer
.
updatePreference
(
key
,
value
,
source
,
index
);
preferencesRenderer
.
updatePreference
(
key
,
value
,
source
);
}
}
...
...
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
浏览文件 @
2809ed71
...
...
@@ -40,10 +40,10 @@ export interface IPreferencesRenderer<T> extends IDisposable {
onFocusPreference
:
Event
<
T
>
;
onClearFocusPreference
:
Event
<
T
>
;
onUpdatePreference
?:
Event
<
{
key
:
string
,
value
:
any
,
source
:
T
,
index
:
number
}
>
;
onUpdatePreference
?:
Event
<
{
key
:
string
,
value
:
any
,
source
:
T
}
>
;
render
():
void
;
updatePreference
(
key
:
string
,
value
:
any
,
source
:
T
,
index
:
number
):
void
;
updatePreference
(
key
:
string
,
value
:
any
,
source
:
T
):
void
;
focusPreference
(
setting
:
T
):
void
;
clearFocus
(
setting
:
T
):
void
;
filterPreferences
(
filterResult
:
IFilterResult
):
void
;
...
...
@@ -75,7 +75,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
this
.
settingHighlighter
=
this
.
_register
(
instantiationService
.
createInstance
(
SettingHighlighter
,
editor
,
this
.
_onFocusPreference
,
this
.
_onClearFocusPreference
));
this
.
highlightMatchesRenderer
=
this
.
_register
(
instantiationService
.
createInstance
(
HighlightMatchesRenderer
,
editor
));
this
.
editSettingActionRenderer
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
EditSettingRenderer
,
this
.
editor
,
this
.
preferencesModel
,
this
.
settingHighlighter
));
this
.
_register
(
this
.
editSettingActionRenderer
.
onUpdateSetting
(({
key
,
value
,
source
,
index
})
=>
this
.
updatePreference
(
key
,
value
,
source
,
index
,
true
)));
this
.
_register
(
this
.
editSettingActionRenderer
.
onUpdateSetting
(({
key
,
value
,
source
})
=>
this
.
updatePreference
(
key
,
value
,
source
,
true
)));
this
.
_register
(
this
.
editor
.
getModel
().
onDidChangeContent
(()
=>
this
.
modelChangeDelayer
.
trigger
(()
=>
this
.
onModelChanged
())));
this
.
createHeader
();
...
...
@@ -101,7 +101,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
}
}
public
updatePreference
(
key
:
string
,
value
:
any
,
source
:
I
Setting
,
index
:
number
,
fromEditableSettings
?:
boolean
):
void
{
public
updatePreference
(
key
:
string
,
value
:
any
,
source
:
I
IndexedSetting
,
fromEditableSettings
?:
boolean
):
void
{
const
data
=
{
userConfigurationKeys
:
[
key
]
};
...
...
@@ -110,7 +110,8 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
data
[
'
query
'
]
=
this
.
filterResult
.
query
;
data
[
'
fuzzy
'
]
=
!!
this
.
filterResult
.
metadata
;
data
[
'
duration
'
]
=
this
.
filterResult
.
metadata
&&
this
.
filterResult
.
metadata
.
duration
;
data
[
'
index
'
]
=
index
;
data
[
'
index
'
]
=
source
.
index
;
data
[
'
groupId
'
]
=
source
.
groupId
;
data
[
'
editableSide
'
]
=
!!
fromEditableSettings
;
}
...
...
@@ -249,8 +250,8 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR
private
bracesHidingRenderer
:
BracesHidingRenderer
;
private
filterResult
:
IFilterResult
;
private
_onUpdatePreference
:
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
I
Setting
,
index
:
number
}
>
=
new
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
ISetting
,
index
:
number
}
>
();
public
readonly
onUpdatePreference
:
Event
<
{
key
:
string
,
value
:
any
,
source
:
I
Setting
,
index
:
number
}
>
=
this
.
_onUpdatePreference
.
event
;
private
_onUpdatePreference
:
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
I
IndexedSetting
}
>
=
new
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
IIndexedSetting
}
>
();
public
readonly
onUpdatePreference
:
Event
<
{
key
:
string
,
value
:
any
,
source
:
I
IndexedSetting
}
>
=
this
.
_onUpdatePreference
.
event
;
private
_onFocusPreference
:
Emitter
<
ISetting
>
=
new
Emitter
<
ISetting
>
();
public
readonly
onFocusPreference
:
Event
<
ISetting
>
=
this
.
_onFocusPreference
.
event
;
...
...
@@ -828,8 +829,9 @@ export class HighlightMatchesRenderer extends Disposable {
}
}
interface
IIndexedSetting
extends
ISetting
{
export
interface
IIndexedSetting
extends
ISetting
{
index
:
number
;
groupId
:
string
;
}
class
EditSettingRenderer
extends
Disposable
{
...
...
@@ -841,8 +843,8 @@ class EditSettingRenderer extends Disposable {
public
associatedPreferencesModel
:
IPreferencesEditorModel
<
ISetting
>
;
private
toggleEditPreferencesForMouseMoveDelayer
:
Delayer
<
void
>
;
private
_onUpdateSetting
:
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
I
Setting
,
index
:
number
}
>
=
new
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
ISetting
,
index
:
number
}
>
();
public
readonly
onUpdateSetting
:
Event
<
{
key
:
string
,
value
:
any
,
source
:
I
Setting
,
index
:
number
}
>
=
this
.
_onUpdateSetting
.
event
;
private
_onUpdateSetting
:
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
I
IndexedSetting
}
>
=
new
Emitter
<
{
key
:
string
,
value
:
any
,
source
:
IIndexedSetting
}
>
();
public
readonly
onUpdateSetting
:
Event
<
{
key
:
string
,
value
:
any
,
source
:
I
IndexedSetting
}
>
=
this
.
_onUpdateSetting
.
event
;
constructor
(
private
editor
:
ICodeEditor
,
private
masterSettingsModel
:
ISettingsEditorModel
,
private
settingHighlighter
:
SettingHighlighter
,
...
...
@@ -978,7 +980,7 @@ class EditSettingRenderer extends Disposable {
// index of setting, across all groups/sections
let
index
=
0
;
const
settings
=
[];
const
settings
:
IIndexedSetting
[]
=
[];
for
(
const
group
of
this
.
settingsGroups
)
{
if
(
group
.
range
.
startLineNumber
>
lineNumber
)
{
break
;
...
...
@@ -994,11 +996,11 @@ class EditSettingRenderer extends Disposable {
// Only one level because override settings cannot have override settings
for
(
const
overrideSetting
of
setting
.
overrides
)
{
if
(
lineNumber
>=
overrideSetting
.
range
.
startLineNumber
&&
lineNumber
<=
overrideSetting
.
range
.
endLineNumber
)
{
settings
.
push
({
...
overrideSetting
,
index
});
settings
.
push
({
...
overrideSetting
,
index
,
groupId
:
group
.
id
});
}
}
}
else
{
settings
.
push
({
...
setting
,
index
});
settings
.
push
({
...
setting
,
index
,
groupId
:
group
.
id
});
}
}
...
...
@@ -1069,7 +1071,7 @@ class EditSettingRenderer extends Disposable {
}
private
updateSetting
(
key
:
string
,
value
:
any
,
source
:
IIndexedSetting
):
void
{
this
.
_onUpdateSetting
.
fire
({
key
,
value
,
source
,
index
:
source
.
index
});
this
.
_onUpdateSetting
.
fire
({
key
,
value
,
source
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录