Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
d88e7135
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d88e7135
编写于
11月 27, 2017
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix remote search metadata missing from copySetting telemetry,
and highlighted editable results out of sync with default settings
上级
e2728807
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
11 deletion
+18
-11
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
.../workbench/parts/preferences/browser/preferencesEditor.ts
+18
-11
未找到文件。
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
d88e7135
...
...
@@ -25,7 +25,7 @@ import { CodeEditor } from 'vs/editor/browser/codeEditor';
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IPreferencesService
,
ISettingsGroup
,
ISetting
,
IFilterResult
,
IPreferencesSearchService
,
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
SETTINGS_EDITOR_COMMAND_SEARCH
,
SETTINGS_EDITOR_COMMAND_FOCUS_FILE
,
ISettingsEditorModel
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
,
SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING
,
SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING
,
IFilterMetadata
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
SETTINGS_EDITOR_COMMAND_SEARCH
,
SETTINGS_EDITOR_COMMAND_FOCUS_FILE
,
ISettingsEditorModel
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
,
SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING
,
SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING
,
IFilterMetadata
,
IPreferencesSearchModel
}
from
'
vs/workbench/parts/preferences/common/preferences
'
;
import
{
SettingsEditorModel
,
DefaultSettingsEditorModel
}
from
'
vs/workbench/parts/preferences/common/preferencesModels
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
...
...
@@ -387,6 +387,7 @@ class PreferencesRenderers extends Disposable {
private
_settingsNavigator
:
SettingsNavigator
;
private
_filtersInProgress
:
TPromise
<
any
>
[];
private
_searchCriteria
:
ISearchCriteria
;
private
_currentSearchModel
:
IPreferencesSearchModel
;
private
_onTriggeredFuzzy
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
public
onTriggeredFuzzy
:
Event
<
void
>
=
this
.
_onTriggeredFuzzy
.
event
;
...
...
@@ -404,6 +405,10 @@ class PreferencesRenderers extends Disposable {
return
this
.
_defaultPreferencesRenderer
;
}
get
editablePreferencesRenderer
():
IPreferencesRenderer
<
ISetting
>
{
return
this
.
_editablePreferencesRenderer
;
}
set
defaultPreferencesRenderer
(
defaultPreferencesRenderer
:
IPreferencesRenderer
<
ISetting
>
)
{
if
(
this
.
_defaultPreferencesRenderer
!==
defaultPreferencesRenderer
)
{
this
.
_defaultPreferencesRenderer
=
defaultPreferencesRenderer
;
...
...
@@ -427,11 +432,13 @@ class PreferencesRenderers extends Disposable {
this
.
_editablePreferencesRendererDisposables
=
dispose
(
this
.
_editablePreferencesRendererDisposables
);
if
(
this
.
_editablePreferencesRenderer
)
{
(
<
ISettingsEditorModel
>
this
.
_editablePreferencesRenderer
.
preferencesModel
).
onDidChangeGroups
(()
=>
{
this
.
_filterEditablePreferences
()
.
then
(()
=>
{
const
count
=
this
.
consolidateAndUpdate
();
this
.
_onDidFilterResultsCountChange
.
fire
(
count
);
});
if
(
this
.
_currentSearchModel
)
{
this
.
_filterEditablePreferences
()
.
then
(()
=>
{
const
count
=
this
.
consolidateAndUpdate
();
this
.
_onDidFilterResultsCountChange
.
fire
(
count
);
});
}
},
this
,
this
.
_editablePreferencesRendererDisposables
);
}
}
...
...
@@ -445,6 +452,7 @@ class PreferencesRenderers extends Disposable {
this
.
_filtersInProgress
.
forEach
(
p
=>
p
.
cancel
&&
p
.
cancel
());
}
this
.
_currentSearchModel
=
this
.
preferencesSearchService
.
startSearch
(
this
.
_searchCriteria
.
filter
,
criteria
.
fuzzy
);
this
.
_filtersInProgress
=
[
this
.
_filterDefaultPreferences
(),
this
.
_filterEditablePreferences
()];
return
TPromise
.
join
<
IFilterResult
>
(
this
.
_filtersInProgress
).
then
(()
=>
{
...
...
@@ -473,7 +481,7 @@ class PreferencesRenderers extends Disposable {
private
_filterDefaultPreferences
():
TPromise
<
void
>
{
if
(
this
.
_searchCriteria
&&
this
.
_defaultPreferencesRenderer
)
{
return
this
.
_filterPreferences
(
this
.
_searchCriteria
,
this
.
_defaultPreferencesRenderer
)
return
this
.
_filterPreferences
(
this
.
_searchCriteria
,
this
.
_defaultPreferencesRenderer
,
this
.
_currentSearchModel
)
.
then
(
filterResult
=>
{
this
.
_defaultPreferencesFilterResult
=
filterResult
;
});
}
return
TPromise
.
wrap
(
null
);
...
...
@@ -481,7 +489,7 @@ class PreferencesRenderers extends Disposable {
private
_filterEditablePreferences
():
TPromise
<
void
>
{
if
(
this
.
_searchCriteria
&&
this
.
_editablePreferencesRenderer
)
{
return
this
.
_filterPreferences
(
{
filter
:
this
.
_searchCriteria
.
filter
,
fuzzy
:
false
},
this
.
_editablePreferencesRenderer
)
return
this
.
_filterPreferences
(
this
.
_searchCriteria
,
this
.
_editablePreferencesRenderer
,
this
.
_currentSearchModel
)
.
then
(
filterResult
=>
{
this
.
_editablePreferencesFilterResult
=
filterResult
;
});
}
return
TPromise
.
wrap
(
null
);
...
...
@@ -500,9 +508,8 @@ class PreferencesRenderers extends Disposable {
return
preferencesRenderer
?
(
<
ISettingsEditorModel
>
preferencesRenderer
.
preferencesModel
).
settingsGroups
:
[];
}
private
_filterPreferences
(
searchCriteria
:
ISearchCriteria
,
preferencesRenderer
:
IPreferencesRenderer
<
ISetting
>
):
TPromise
<
IFilterResult
>
{
if
(
preferencesRenderer
)
{
const
searchModel
=
this
.
preferencesSearchService
.
startSearch
(
searchCriteria
.
filter
,
searchCriteria
.
fuzzy
);
private
_filterPreferences
(
searchCriteria
:
ISearchCriteria
,
preferencesRenderer
:
IPreferencesRenderer
<
ISetting
>
,
searchModel
:
IPreferencesSearchModel
):
TPromise
<
IFilterResult
>
{
if
(
preferencesRenderer
&&
searchCriteria
)
{
const
prefSearchP
=
searchModel
.
filterPreferences
(
<
ISettingsEditorModel
>
preferencesRenderer
.
preferencesModel
);
return
prefSearchP
.
then
(
filterResult
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录