Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
34573b3d
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,发现更多精彩内容 >>
提交
34573b3d
编写于
6月 10, 2020
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removes usages of deprecated values helper
#99664
上级
bcbe1ef9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
9 deletion
+7
-9
src/vs/workbench/api/browser/mainThreadSearch.ts
src/vs/workbench/api/browser/mainThreadSearch.ts
+1
-2
src/vs/workbench/contrib/search/common/queryBuilder.ts
src/vs/workbench/contrib/search/common/queryBuilder.ts
+1
-2
src/vs/workbench/contrib/search/common/searchModel.ts
src/vs/workbench/contrib/search/common/searchModel.ts
+3
-3
src/vs/workbench/services/search/common/searchService.ts
src/vs/workbench/services/search/common/searchService.ts
+2
-2
未找到文件。
src/vs/workbench/api/browser/mainThreadSearch.ts
浏览文件 @
34573b3d
...
...
@@ -5,7 +5,6 @@
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
dispose
,
IDisposable
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
{
values
}
from
'
vs/base/common/map
'
;
import
{
URI
,
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
...
...
@@ -139,7 +138,7 @@ class RemoteSearchProvider implements ISearchResultProvider, IDisposable {
return
Promise
.
resolve
(
searchP
).
then
((
result
:
ISearchCompleteStats
)
=>
{
this
.
_searches
.
delete
(
search
.
id
);
return
{
results
:
values
(
search
.
matches
),
stats
:
result
.
stats
,
limitHit
:
result
.
limitHit
};
return
{
results
:
Array
.
from
(
search
.
matches
.
values
()
),
stats
:
result
.
stats
,
limitHit
:
result
.
limitHit
};
},
err
=>
{
this
.
_searches
.
delete
(
search
.
id
);
return
Promise
.
reject
(
err
);
...
...
src/vs/workbench/contrib/search/common/queryBuilder.ts
浏览文件 @
34573b3d
...
...
@@ -7,7 +7,6 @@ import * as arrays from 'vs/base/common/arrays';
import
*
as
collections
from
'
vs/base/common/collections
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
{
untildify
}
from
'
vs/base/common/labels
'
;
import
{
values
}
from
'
vs/base/common/map
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
*
as
path
from
'
vs/base/common/path
'
;
import
{
isEqual
}
from
'
vs/base/common/resources
'
;
...
...
@@ -324,7 +323,7 @@ export class QueryBuilder {
}
});
return
values
(
searchPathPatternMap
);
return
Array
.
from
(
searchPathPatternMap
.
values
()
);
}
/**
...
...
src/vs/workbench/contrib/search/common/searchModel.ts
浏览文件 @
34573b3d
...
...
@@ -9,7 +9,7 @@ import * as errors from 'vs/base/common/errors';
import
{
Emitter
,
Event
}
from
'
vs/base/common/event
'
;
import
{
getBaseLabel
}
from
'
vs/base/common/labels
'
;
import
{
Disposable
,
IDisposable
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
{
ResourceMap
,
TernarySearchTree
,
values
}
from
'
vs/base/common/map
'
;
import
{
ResourceMap
,
TernarySearchTree
}
from
'
vs/base/common/map
'
;
import
*
as
objects
from
'
vs/base/common/objects
'
;
import
{
lcut
}
from
'
vs/base/common/strings
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
...
...
@@ -293,7 +293,7 @@ export class FileMatch extends Disposable implements IFileMatch {
endLineNumber
:
lineNumber
,
endColumn
:
this
.
_model
.
getLineMaxColumn
(
lineNumber
)
};
const
oldMatches
=
values
(
this
.
_matches
).
filter
(
match
=>
match
.
range
().
startLineNumber
===
lineNumber
);
const
oldMatches
=
Array
.
from
(
this
.
_matches
.
values
()
).
filter
(
match
=>
match
.
range
().
startLineNumber
===
lineNumber
);
oldMatches
.
forEach
(
match
=>
this
.
_matches
.
delete
(
match
.
id
()));
const
wordSeparators
=
this
.
_query
.
isWordMatch
&&
this
.
_query
.
wordSeparators
?
this
.
_query
.
wordSeparators
:
null
;
...
...
@@ -351,7 +351,7 @@ export class FileMatch extends Disposable implements IFileMatch {
}
matches
():
Match
[]
{
return
values
(
this
.
_matches
);
return
Array
.
from
(
this
.
_matches
.
values
()
);
}
remove
(
match
:
Match
):
void
{
...
...
src/vs/workbench/services/search/common/searchService.ts
浏览文件 @
34573b3d
...
...
@@ -7,7 +7,7 @@ import * as arrays from 'vs/base/common/arrays';
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
canceled
}
from
'
vs/base/common/errors
'
;
import
{
Disposable
,
IDisposable
,
toDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
keys
,
ResourceMap
,
values
}
from
'
vs/base/common/map
'
;
import
{
keys
,
ResourceMap
}
from
'
vs/base/common/map
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
StopWatch
}
from
'
vs/base/common/stopwatch
'
;
import
{
URI
as
uri
}
from
'
vs/base/common/uri
'
;
...
...
@@ -493,7 +493,7 @@ export class SearchService extends Disposable implements ISearchService {
clearCache
(
cacheKey
:
string
):
Promise
<
void
>
{
const
clearPs
=
[
this
.
diskSearch
,
...
values
(
this
.
fileSearchProviders
)
...
Array
.
from
(
this
.
fileSearchProviders
.
values
()
)
].
map
(
provider
=>
provider
&&
provider
.
clearCache
(
cacheKey
));
return
Promise
.
all
(
clearPs
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录