Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9536c27e
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,发现更多精彩内容 >>
提交
9536c27e
编写于
5月 22, 2017
作者:
S
Sandeep Somavarapu
提交者:
GitHub
5月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #26969 from nicksnyder/search
Make SearchWidget dependencies injectable
上级
6e436932
b8e4b7f5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
src/vs/workbench/parts/search/browser/searchViewlet.ts
src/vs/workbench/parts/search/browser/searchViewlet.ts
+3
-5
src/vs/workbench/parts/search/browser/searchWidget.ts
src/vs/workbench/parts/search/browser/searchWidget.ts
+8
-3
未找到文件。
src/vs/workbench/parts/search/browser/searchViewlet.ts
浏览文件 @
9536c27e
...
...
@@ -42,13 +42,12 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IProgressService
}
from
'
vs/platform/progress/common/progress
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
PatternInputWidget
,
ExcludePatternInputWidget
}
from
'
vs/workbench/parts/search/browser/patternInputWidget
'
;
import
{
SearchRenderer
,
SearchDataSource
,
SearchSorter
,
SearchAccessibilityProvider
,
SearchFilter
}
from
'
vs/workbench/parts/search/browser/searchResultsView
'
;
import
{
SearchWidget
}
from
'
vs/workbench/parts/search/browser/searchWidget
'
;
import
{
SearchWidget
,
ISearchWidgetOptions
}
from
'
vs/workbench/parts/search/browser/searchWidget
'
;
import
{
RefreshAction
,
CollapseAllAction
,
ClearSearchResultsAction
,
ConfigureGlobalExclusionsAction
}
from
'
vs/workbench/parts/search/browser/searchActions
'
;
import
{
IReplaceService
}
from
'
vs/workbench/parts/search/common/replace
'
;
import
Severity
from
'
vs/base/common/severity
'
;
...
...
@@ -117,7 +116,6 @@ export class SearchViewlet extends Viewlet {
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
ISearchWorkbenchService
private
searchWorkbenchService
:
ISearchWorkbenchService
,
@
IContextKeyService
private
contextKeyService
:
IContextKeyService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IReplaceService
private
replaceService
:
IReplaceService
,
@
IUntitledEditorService
private
untitledEditorService
:
IUntitledEditorService
,
@
IPreferencesService
private
preferencesService
:
IPreferencesService
,
...
...
@@ -290,12 +288,12 @@ export class SearchViewlet extends Viewlet {
let
isWholeWords
=
this
.
viewletSettings
[
'
query.wholeWords
'
]
===
true
;
let
isCaseSensitive
=
this
.
viewletSettings
[
'
query.caseSensitive
'
]
===
true
;
this
.
searchWidget
=
new
SearchWidget
(
builder
,
this
.
contextViewService
,
this
.
themeService
,
{
this
.
searchWidget
=
this
.
instantiationService
.
createInstance
(
SearchWidget
,
builder
,
<
ISearchWidgetOptions
>
{
value
:
contentPattern
,
isRegex
:
isRegex
,
isCaseSensitive
:
isCaseSensitive
,
isWholeWords
:
isWholeWords
}
,
this
.
contextKeyService
,
this
.
keybindingService
,
this
.
instantiationService
);
});
if
(
this
.
storageService
.
getBoolean
(
SearchViewlet
.
SHOW_REPLACE_STORAGE_KEY
,
StorageScope
.
WORKSPACE
,
true
))
{
this
.
searchWidget
.
toggleReplace
(
true
);
...
...
src/vs/workbench/parts/search/browser/searchWidget.ts
浏览文件 @
9536c27e
...
...
@@ -21,7 +21,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Builder
}
from
'
vs/base/browser/builder
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
isSearchViewletFocussed
,
appendKeyBindingLabel
}
from
'
vs/workbench/parts/search/browser/searchActions
'
;
import
{
CONTEXT_FIND_WIDGET_NOT_VISIBLE
}
from
'
vs/editor/contrib/find/common/findController
'
;
...
...
@@ -111,8 +110,14 @@ export class SearchWidget extends Widget {
private
_onReplaceAll
=
this
.
_register
(
new
Emitter
<
void
>
());
public
onReplaceAll
:
Event
<
void
>
=
this
.
_onReplaceAll
.
event
;
constructor
(
container
:
Builder
,
private
contextViewService
:
IContextViewService
,
private
themeService
:
IThemeService
,
options
:
ISearchWidgetOptions
=
Object
.
create
(
null
),
private
keyBindingService
:
IContextKeyService
,
private
keyBindingService2
:
IKeybindingService
,
private
instantiationService
:
IInstantiationService
)
{
constructor
(
container
:
Builder
,
options
:
ISearchWidgetOptions
,
@
IContextViewService
private
contextViewService
:
IContextViewService
,
@
IThemeService
private
themeService
:
IThemeService
,
@
IContextKeyService
private
keyBindingService
:
IContextKeyService
,
@
IKeybindingService
private
keyBindingService2
:
IKeybindingService
,
)
{
super
();
this
.
searchHistory
=
new
HistoryNavigator
<
string
>
();
this
.
replaceActive
=
Constants
.
ReplaceActiveKey
.
bindTo
(
this
.
keyBindingService
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录