Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c8c10522
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,发现更多精彩内容 >>
提交
c8c10522
编写于
3月 13, 2017
作者:
C
Cody Hoover
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add backwards search to preferences view
上级
3b7329ea
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
31 addition
and
11 deletion
+31
-11
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
+25
-5
src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts
...workbench/parts/preferences/browser/preferencesWidgets.ts
+3
-3
未找到文件。
src/vs/workbench/parts/preferences/browser/preferencesEditor.ts
浏览文件 @
c8c10522
...
...
@@ -124,7 +124,7 @@ export class PreferencesEditor extends BaseEditor {
this
.
searchWidget
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
SearchWidget
,
this
.
headerContainer
));
this
.
_register
(
this
.
searchWidget
.
onDidChange
(
value
=>
this
.
filterPreferences
(
value
.
trim
())));
this
.
_register
(
this
.
searchWidget
.
onEnter
(
value
=>
this
.
preferencesRenderers
.
focusNextPreference
(
)));
this
.
_register
(
this
.
searchWidget
.
onEnter
(
shift
=>
this
.
preferencesRenderers
.
focusNextPreference
(
!
shift
)));
this
.
settingsTabsWidget
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
SettingsTabsWidget
,
this
.
headerContainer
));
this
.
_register
(
this
.
settingsTabsWidget
.
onSwitch
(()
=>
this
.
switchSettings
()));
...
...
@@ -265,8 +265,8 @@ class PreferencesRenderers extends Disposable {
return
this
.
_getCount
(
filterResult
?
filterResult
.
filteredGroups
:
(
this
.
_defaultPreferencesRenderer
?
(
<
ISettingsEditorModel
>
this
.
_defaultPreferencesRenderer
.
preferencesModel
).
settingsGroups
:
[]));
}
public
focusNextPreference
()
{
const
setting
=
this
.
_defaultPreferencesRenderer
.
iterator
.
next
();
public
focusNextPreference
(
forward
:
boolean
=
true
)
{
const
setting
=
forward
?
this
.
_defaultPreferencesRenderer
.
iterator
.
next
()
:
this
.
_defaultPreferencesRenderer
.
iterator
.
previous
();
this
.
_focusPreference
(
setting
,
this
.
_defaultPreferencesRenderer
);
this
.
_focusPreference
(
setting
,
this
.
_editablePreferencesRenderer
);
}
...
...
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
浏览文件 @
c8c10522
...
...
@@ -9,7 +9,7 @@ import * as DOM from 'vs/base/browser/dom';
import
{
Delayer
}
from
'
vs/base/common/async
'
;
import
{
Disposable
,
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
flatten
,
distinct
}
from
'
vs/base/common/arrays
'
;
import
{
ArrayNavigator
,
I
Iter
ator
}
from
'
vs/base/common/iterator
'
;
import
{
ArrayNavigator
,
I
Navig
ator
}
from
'
vs/base/common/iterator
'
;
import
{
IAction
}
from
'
vs/base/common/actions
'
;
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -36,7 +36,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
export
interface
IPreferencesRenderer
<
T
>
extends
IDisposable
{
preferencesModel
:
IPreferencesEditorModel
<
T
>
;
associatedPreferencesModel
:
IPreferencesEditorModel
<
T
>
;
iterator
:
I
Iter
ator
<
T
>
;
iterator
:
I
Navig
ator
<
T
>
;
onFocusPreference
:
Event
<
T
>
;
onClearFocusPreference
:
Event
<
T
>
;
...
...
@@ -86,7 +86,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
this
.
_register
(
this
.
editor
.
getModel
().
onDidChangeContent
(()
=>
this
.
modelChangeDelayer
.
trigger
(()
=>
this
.
onModelChanged
())));
}
public
get
iterator
():
I
Iter
ator
<
ISetting
>
{
public
get
iterator
():
I
Navig
ator
<
ISetting
>
{
return
null
;
}
...
...
@@ -230,7 +230,7 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR
this
.
_register
(
this
.
settingsGroupTitleRenderer
.
onHiddenAreasChanged
(()
=>
this
.
hiddenAreasRenderer
.
render
()));
}
public
get
iterator
():
I
Iter
ator
<
ISetting
>
{
public
get
iterator
():
I
Navig
ator
<
ISetting
>
{
return
this
.
filteredSettingsNavigationRenderer
;
}
...
...
@@ -577,7 +577,7 @@ export class HighlightPreferencesRenderer extends Disposable {
}
}
class
FilteredSettingsNavigationRenderer
extends
Disposable
implements
I
Iter
ator
<
ISetting
>
{
class
FilteredSettingsNavigationRenderer
extends
Disposable
implements
I
Navig
ator
<
ISetting
>
{
private
iterator
:
ArrayNavigator
<
ISetting
>
;
...
...
@@ -589,6 +589,26 @@ class FilteredSettingsNavigationRenderer extends Disposable implements IIterator
return
this
.
iterator
.
next
()
||
this
.
iterator
.
first
();
}
public
previous
():
ISetting
{
return
this
.
iterator
.
previous
()
||
this
.
iterator
.
last
();
}
public
parent
():
ISetting
{
return
this
.
iterator
.
parent
();
}
public
first
():
ISetting
{
return
this
.
iterator
.
first
();
}
public
last
():
ISetting
{
return
this
.
iterator
.
last
();
}
public
current
():
ISetting
{
return
this
.
iterator
.
current
();
}
public
render
(
filteredGroups
:
ISettingsGroup
[])
{
this
.
settingHighlighter
.
clear
(
true
);
const
settings
:
ISetting
[]
=
[];
...
...
src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts
浏览文件 @
c8c10522
...
...
@@ -235,8 +235,8 @@ export class SearchWidget extends Widget {
private
_onDidChange
=
this
.
_register
(
new
Emitter
<
string
>
());
public
onDidChange
:
Event
<
string
>
=
this
.
_onDidChange
.
event
;
private
_onEnter
=
this
.
_register
(
new
Emitter
<
void
>
());
public
onEnter
:
Event
<
void
>
=
this
.
_onEnter
.
event
;
private
_onEnter
=
this
.
_register
(
new
Emitter
<
boolean
>
());
public
onEnter
:
Event
<
boolean
>
=
this
.
_onEnter
.
event
;
constructor
(
parent
:
HTMLElement
,
@
IContextViewService
private
contextViewService
:
IContextViewService
,
...
...
@@ -299,7 +299,7 @@ export class SearchWidget extends Widget {
let
handled
=
false
;
switch
(
keyboardEvent
.
keyCode
)
{
case
KeyCode
.
Enter
:
this
.
_onEnter
.
fire
();
this
.
_onEnter
.
fire
(
keyboardEvent
.
shiftKey
);
handled
=
true
;
break
;
case
KeyCode
.
Escape
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录