Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
93de3d65
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,发现更多精彩内容 >>
提交
93de3d65
编写于
7月 18, 2017
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove "files excluded through settings" box - #27226
上级
b896d250
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
72 deletion
+3
-72
src/vs/workbench/parts/search/browser/searchActions.ts
src/vs/workbench/parts/search/browser/searchActions.ts
+0
-16
src/vs/workbench/parts/search/browser/searchViewlet.ts
src/vs/workbench/parts/search/browser/searchViewlet.ts
+3
-56
未找到文件。
src/vs/workbench/parts/search/browser/searchActions.ts
浏览文件 @
93de3d65
...
...
@@ -19,7 +19,6 @@ import { SearchResult, Match, FileMatch, FileMatchOrMatch } from 'vs/workbench/p
import
{
IReplaceService
}
from
'
vs/workbench/parts/search/common/replace
'
;
import
*
as
Constants
from
'
vs/workbench/parts/search/common/constants
'
;
import
{
CollapseAllAction
as
TreeCollapseAction
}
from
'
vs/base/parts/tree/browser/treeDefaults
'
;
import
{
IPreferencesService
}
from
'
vs/workbench/parts/preferences/common/preferences
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ResolvedKeybinding
,
createKeybinding
}
from
'
vs/base/common/keyCodes
'
;
...
...
@@ -523,18 +522,3 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction {
return
false
;
}
}
export
class
ConfigureGlobalExclusionsAction
extends
Action
{
constructor
(
@
IPreferencesService
private
preferencesService
:
IPreferencesService
)
{
super
(
'
configureGlobalExclusionsAction
'
);
this
.
label
=
nls
.
localize
(
'
ConfigureGlobalExclusionsAction.label
'
,
"
Open Settings
"
);
this
.
enabled
=
true
;
this
.
class
=
'
search-configure-exclusions
'
;
}
public
run
():
TPromise
<
void
>
{
return
this
.
preferencesService
.
openGlobalSettings
().
then
(
null
,
errors
.
onUnexpectedError
);
}
}
src/vs/workbench/parts/search/browser/searchViewlet.ts
浏览文件 @
93de3d65
...
...
@@ -32,8 +32,8 @@ import { FileChangeType, FileChangesEvent, IFileService } from 'vs/platform/file
import
{
Viewlet
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
Match
,
FileMatch
,
SearchModel
,
FileMatchOrMatch
,
IChangeEvent
,
ISearchWorkbenchService
}
from
'
vs/workbench/parts/search/common/searchModel
'
;
import
{
QueryBuilder
}
from
'
vs/workbench/parts/search/common/queryBuilder
'
;
import
{
MessageType
,
InputBox
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
getExcludes
,
ISearchProgressItem
,
ISearchComplete
,
ISearchQuery
,
IQueryOptions
,
ISearchConfiguration
}
from
'
vs/platform/search/common/search
'
;
import
{
MessageType
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
ISearchProgressItem
,
ISearchComplete
,
ISearchQuery
,
IQueryOptions
,
ISearchConfiguration
}
from
'
vs/platform/search/common/search
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -48,7 +48,7 @@ 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
,
ISearchWidgetOptions
}
from
'
vs/workbench/parts/search/browser/searchWidget
'
;
import
{
RefreshAction
,
CollapseAllAction
,
ClearSearchResultsAction
,
ConfigureGlobalExclusionsAction
}
from
'
vs/workbench/parts/search/browser/searchActions
'
;
import
{
RefreshAction
,
CollapseAllAction
,
ClearSearchResultsAction
}
from
'
vs/workbench/parts/search/browser/searchActions
'
;
import
{
IReplaceService
}
from
'
vs/workbench/parts/search/common/replace
'
;
import
Severity
from
'
vs/base/common/severity
'
;
import
{
IUntitledEditorService
}
from
'
vs/workbench/services/untitled/common/untitledEditorService
'
;
...
...
@@ -60,7 +60,6 @@ import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutlin
import
FileResultsNavigation
from
'
vs/workbench/parts/files/browser/fileResultsNavigation
'
;
import
{
attachListStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
getOutOfWorkspaceEditorResources
}
from
'
vs/workbench/parts/search/common/search
'
;
import
{
PreferencesEditor
}
from
'
vs/workbench/parts/preferences/browser/preferencesEditor
'
;
...
...
@@ -94,8 +93,6 @@ export class SearchViewlet extends Viewlet {
private
size
:
Dimension
;
private
queryDetails
:
HTMLElement
;
private
inputPatternExcludes
:
ExcludePatternInputWidget
;
private
inputPatternGlobalExclusions
:
InputBox
;
private
inputPatternGlobalExclusionsContainer
:
Builder
;
private
inputPatternIncludes
:
PatternInputWidget
;
private
results
:
Builder
;
...
...
@@ -141,7 +138,6 @@ export class SearchViewlet extends Viewlet {
this
.
toUnbind
.
push
(
this
.
fileService
.
onFileChanges
(
e
=>
this
.
onFilesChanged
(
e
)));
this
.
toUnbind
.
push
(
this
.
untitledEditorService
.
onDidChangeDirty
(
e
=>
this
.
onUntitledDidChangeDirty
(
e
)));
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
onConfigurationUpdated
()));
this
.
selectCurrentMatchEmitter
=
new
Emitter
<
string
>
();
debounceEvent
(
this
.
selectCurrentMatchEmitter
.
event
,
(
l
,
e
)
=>
e
,
100
,
/*leading=*/
true
)
...
...
@@ -150,12 +146,6 @@ export class SearchViewlet extends Viewlet {
this
.
delayedRefresh
=
new
Delayer
<
void
>
(
250
);
}
private
onConfigurationUpdated
():
void
{
const
resource
=
this
.
contextService
.
hasWorkspace
()
?
this
.
contextService
.
getWorkspace
().
roots
[
0
]
:
undefined
;
const
config
=
this
.
configurationService
.
getConfiguration
<
ISearchConfiguration
>
(
undefined
,
{
resource
});
this
.
updateGlobalPatternExclusions
(
config
);
}
public
create
(
parent
:
Builder
):
TPromise
<
void
>
{
super
.
create
(
parent
);
...
...
@@ -236,22 +226,6 @@ export class SearchViewlet extends Viewlet {
this
.
inputPatternExcludes
.
onSubmit
(()
=>
this
.
onQueryChanged
(
true
,
true
));
this
.
trackInputBox
(
this
.
inputPatternExcludes
.
inputFocusTracker
);
});
// add hint if we have global exclusion
this
.
inputPatternGlobalExclusionsContainer
=
builder
.
div
({
'
class
'
:
'
file-types global-exclude
'
},
(
builder
)
=>
{
let
title
=
nls
.
localize
(
'
global.searchScope.folders
'
,
"
files excluded through settings
"
);
builder
.
element
(
'
h4
'
,
{
text
:
title
});
this
.
inputPatternGlobalExclusions
=
new
InputBox
(
builder
.
getContainer
(),
this
.
contextViewService
,
{
actions
:
[
this
.
instantiationService
.
createInstance
(
ConfigureGlobalExclusionsAction
)],
ariaLabel
:
nls
.
localize
(
'
label.global.excludes
'
,
'
Configured Search Exclude Patterns
'
),
// override some styles because this input is disabled
inputBackground
:
Color
.
transparent
,
inputForeground
:
null
});
this
.
inputPatternGlobalExclusions
.
inputElement
.
readOnly
=
true
;
$
(
this
.
inputPatternGlobalExclusions
.
inputElement
).
attr
(
'
aria-readonly
'
,
'
true
'
);
}).
hide
();
}).
getHTMLElement
();
this
.
messages
=
builder
.
div
({
'
class
'
:
'
messages
'
}).
hide
().
clone
();
...
...
@@ -271,8 +245,6 @@ export class SearchViewlet extends Viewlet {
this
.
toggleQueryDetails
(
true
,
true
,
true
);
}
this
.
updateGlobalPatternExclusions
(
this
.
configurationService
.
getConfiguration
<
ISearchConfiguration
>
());
this
.
toUnbind
.
push
(
this
.
viewModel
.
searchResult
.
onChange
((
event
)
=>
this
.
onSearchResultsChanged
(
event
)));
return
TPromise
.
as
(
null
);
...
...
@@ -524,30 +496,6 @@ export class SearchViewlet extends Viewlet {
});
}
private
updateGlobalPatternExclusions
(
configuration
:
ISearchConfiguration
):
void
{
if
(
this
.
inputPatternGlobalExclusionsContainer
)
{
let
excludes
=
getExcludes
(
configuration
);
if
(
excludes
)
{
let
exclusions
=
Object
.
getOwnPropertyNames
(
excludes
).
filter
(
exclude
=>
excludes
[
exclude
]
===
true
||
typeof
excludes
[
exclude
].
when
===
'
string
'
).
map
(
exclude
=>
{
if
(
excludes
[
exclude
]
===
true
)
{
return
exclude
;
}
return
nls
.
localize
(
'
globLabel
'
,
"
{0} when {1}
"
,
exclude
,
excludes
[
exclude
].
when
);
});
if
(
exclusions
.
length
)
{
const
values
=
exclusions
.
join
(
'
,
'
);
this
.
inputPatternGlobalExclusions
.
value
=
values
;
this
.
inputPatternGlobalExclusions
.
inputElement
.
title
=
values
;
this
.
inputPatternGlobalExclusionsContainer
.
show
();
}
else
{
this
.
inputPatternGlobalExclusionsContainer
.
hide
();
}
}
}
}
public
selectCurrentMatch
():
void
{
const
focused
=
this
.
tree
.
getFocus
();
const
eventPayload
=
{
focusEditor
:
true
};
...
...
@@ -750,7 +698,6 @@ export class SearchViewlet extends Viewlet {
this
.
inputPatternExcludes
.
setWidth
(
this
.
size
.
width
-
28
/* container margin */
);
this
.
inputPatternIncludes
.
setWidth
(
this
.
size
.
width
-
28
/* container margin */
);
this
.
inputPatternGlobalExclusions
.
width
=
this
.
size
.
width
-
28
/* container margin */
-
24
/* actions */
;
const
messagesSize
=
this
.
messages
.
isHidden
()
?
0
:
dom
.
getTotalHeight
(
this
.
messages
.
getHTMLElement
());
const
searchResultContainerSize
=
this
.
size
.
height
-
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录