提交 73db972b 编写于 作者: R Rob Lourens

findTextInFiles - hook up includes/excludes

上级 0fb670f9
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
'use strict'; 'use strict';
import { posix, relative } from 'path'; import { posix, relative, join } from 'path';
import { delta as arrayDelta } from 'vs/base/common/arrays'; import { delta as arrayDelta } from 'vs/base/common/arrays';
import { Emitter, Event } from 'vs/base/common/event'; import { Emitter, Event } from 'vs/base/common/event';
import { TernarySearchTree } from 'vs/base/common/map'; import { TernarySearchTree } from 'vs/base/common/map';
...@@ -375,15 +375,22 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { ...@@ -375,15 +375,22 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
const requestId = ExtHostWorkspace._requestIdPool++; const requestId = ExtHostWorkspace._requestIdPool++;
const globPatternToString = (pattern: vscode.GlobPattern | string) => {
if (typeof pattern === 'string') {
return pattern;
}
return join(pattern.base, pattern.pattern);
};
const queryOptions: IQueryOptions = { const queryOptions: IQueryOptions = {
ignoreSymlinks: typeof options.followSymlinks === 'boolean' ? !options.followSymlinks : undefined, ignoreSymlinks: typeof options.followSymlinks === 'boolean' ? !options.followSymlinks : undefined,
disregardIgnoreFiles: typeof options.useIgnoreFiles === 'boolean' ? !options.useIgnoreFiles : undefined, disregardIgnoreFiles: typeof options.useIgnoreFiles === 'boolean' ? !options.useIgnoreFiles : undefined,
fileEncoding: options.encoding, fileEncoding: options.encoding,
maxResults: options.maxResults, maxResults: options.maxResults,
// TODO includePattern: options.includes && options.includes.map(include => globPatternToString(include)).join(', '),
// includePattern: options.includes excludePattern: options.excludes && options.excludes.map(exclude => globPatternToString(exclude)).join(', ')
// excludePattern: options.excludes
}; };
this._activeSearchCallbacks[requestId] = p => { this._activeSearchCallbacks[requestId] = p => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册