Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4a26b7d3
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,发现更多精彩内容 >>
提交
4a26b7d3
编写于
9月 05, 2018
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use configured excludes for workspaceContains activationEvent
上级
e91e03f4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
27 deletion
+12
-27
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
+7
-2
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+2
-2
src/vs/workbench/node/extensionHostMain.ts
src/vs/workbench/node/extensionHostMain.ts
+1
-22
src/vs/workbench/parts/search/common/queryBuilder.ts
src/vs/workbench/parts/search/common/queryBuilder.ts
+2
-1
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
浏览文件 @
4a26b7d3
...
...
@@ -214,8 +214,13 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
return
search
;
}
$checkExists
(
query
:
ISearchQuery
,
requestId
:
number
):
Thenable
<
boolean
>
{
query
.
exists
=
true
;
$checkExists
(
includes
:
string
[],
requestId
:
number
):
Thenable
<
boolean
>
{
const
queryBuilder
=
this
.
_instantiationService
.
createInstance
(
QueryBuilder
);
const
folders
=
this
.
_contextService
.
getWorkspace
().
folders
.
map
(
folder
=>
folder
.
uri
);
const
query
=
queryBuilder
.
file
(
folders
,
{
includePattern
:
includes
.
join
(
'
,
'
),
exists
:
true
});
const
tokenSource
=
new
CancellationTokenSource
();
const
search
=
this
.
_searchService
.
search
(
query
,
tokenSource
.
token
).
then
(
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
4a26b7d3
...
...
@@ -26,7 +26,7 @@ import { LabelRules } from 'vs/platform/label/common/label';
import
{
LogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
IMarkerData
}
from
'
vs/platform/markers/common/markers
'
;
import
{
IPickOptions
,
IQuickInputButton
,
IQuickPickItem
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IPatternInfo
,
IQueryOptions
,
IRawFileMatch2
,
IRawSearchQuery
,
ISearchCompleteStats
,
ISearchQuery
}
from
'
vs/platform/search/common/search
'
;
import
{
IPatternInfo
,
IQueryOptions
,
IRawFileMatch2
,
IRawSearchQuery
,
ISearchCompleteStats
}
from
'
vs/platform/search/common/search
'
;
import
{
StatusbarAlignment
as
MainThreadStatusBarAlignment
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
ITelemetryInfo
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ThemeColor
}
from
'
vs/platform/theme/common/themeService
'
;
...
...
@@ -472,7 +472,7 @@ export interface ExtHostUrlsShape {
export
interface
MainThreadWorkspaceShape
extends
IDisposable
{
$startFileSearch
(
includePattern
:
string
,
includeFolder
:
string
,
excludePatternOrDisregardExcludes
:
string
|
false
,
maxResults
:
number
,
requestId
:
number
):
Thenable
<
UriComponents
[]
>
;
$startTextSearch
(
query
:
IPatternInfo
,
options
:
IQueryOptions
,
requestId
:
number
):
Thenable
<
void
>
;
$checkExists
(
query
:
ISearchQuery
,
requestId
:
number
):
Thenable
<
boolean
>
;
$checkExists
(
includes
:
string
[]
,
requestId
:
number
):
Thenable
<
boolean
>
;
$cancelSearch
(
requestId
:
number
):
Thenable
<
boolean
>
;
$saveAll
(
includeUntitled
?:
boolean
):
Thenable
<
boolean
>
;
$updateWorkspaceFolders
(
extensionName
:
string
,
index
:
number
,
deleteCount
:
number
,
workspaceFoldersToAdd
:
{
uri
:
UriComponents
,
name
?:
string
}[]):
Thenable
<
void
>
;
...
...
src/vs/workbench/node/extensionHostMain.ts
浏览文件 @
4a26b7d3
...
...
@@ -13,11 +13,9 @@ import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionS
import
{
ExtHostConfiguration
}
from
'
vs/workbench/api/node/extHostConfiguration
'
;
import
{
ExtHostWorkspace
}
from
'
vs/workbench/api/node/extHostWorkspace
'
;
import
{
IExtensionDescription
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
QueryType
,
ISearchQuery
}
from
'
vs/platform/search/common/search
'
;
import
{
DiskSearch
}
from
'
vs/workbench/services/search/node/searchService
'
;
import
{
IInitData
,
IEnvironment
,
IWorkspaceData
,
MainContext
,
MainThreadWorkspaceShape
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
{
ExtensionActivatedByEvent
}
from
'
vs/workbench/api/node/extHostExtensionActivator
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IMessagePassingProtocol
}
from
'
vs/base/parts/ipc/node/ipc
'
;
...
...
@@ -273,27 +271,8 @@ export class ExtensionHostMain {
this
.
_diskSearch
=
new
DiskSearch
(
false
,
1000
);
}
const
includes
:
glob
.
IExpression
=
{};
globPatterns
.
forEach
((
globPattern
)
=>
{
includes
[
globPattern
]
=
true
;
});
const
folderQueries
=
this
.
_workspace
.
folders
.
map
(
folder
=>
({
folder
:
URI
.
revive
(
folder
.
uri
)
}));
const
config
=
this
.
_extHostConfiguration
.
getConfiguration
(
'
search
'
);
const
useRipgrep
=
config
.
get
(
'
useRipgrep
'
,
true
);
const
followSymlinks
=
config
.
get
(
'
followSymlinks
'
,
true
);
const
query
:
ISearchQuery
=
{
folderQueries
,
type
:
QueryType
.
File
,
exists
:
true
,
includePattern
:
includes
,
useRipgrep
,
ignoreSymlinks
:
!
followSymlinks
};
const
requestId
=
this
.
_searchRequestIdProvider
.
getNext
();
const
searchP
=
this
.
_mainThreadWorkspace
.
$checkExists
(
query
,
requestId
);
;
const
searchP
=
this
.
_mainThreadWorkspace
.
$checkExists
(
globPatterns
,
requestId
)
;
const
timer
=
setTimeout
(
async
()
=>
{
await
this
.
_mainThreadWorkspace
.
$cancelSearch
(
requestId
);
...
...
src/vs/workbench/parts/search/common/queryBuilder.ts
浏览文件 @
4a26b7d3
...
...
@@ -96,7 +96,8 @@ export class QueryBuilder {
disregardIgnoreFiles
:
options
.
disregardIgnoreFiles
||
!
useIgnoreFiles
,
disregardExcludeSettings
:
options
.
disregardExcludeSettings
,
ignoreSymlinks
,
previewOptions
:
options
.
previewOptions
previewOptions
:
options
.
previewOptions
,
exists
:
options
.
exists
};
// Filter extraFileResources against global include/exclude patterns - they are already expected to not belong to a workspace
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录