提交 34573b3d 编写于 作者: R Rob Lourens

Removes usages of deprecated values helper

#99664
上级 bcbe1ef9
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import { CancellationToken } from 'vs/base/common/cancellation'; import { CancellationToken } from 'vs/base/common/cancellation';
import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; 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 { URI, UriComponents } from 'vs/base/common/uri';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers'; import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
...@@ -139,7 +138,7 @@ class RemoteSearchProvider implements ISearchResultProvider, IDisposable { ...@@ -139,7 +138,7 @@ class RemoteSearchProvider implements ISearchResultProvider, IDisposable {
return Promise.resolve(searchP).then((result: ISearchCompleteStats) => { return Promise.resolve(searchP).then((result: ISearchCompleteStats) => {
this._searches.delete(search.id); 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 => { }, err => {
this._searches.delete(search.id); this._searches.delete(search.id);
return Promise.reject(err); return Promise.reject(err);
......
...@@ -7,7 +7,6 @@ import * as arrays from 'vs/base/common/arrays'; ...@@ -7,7 +7,6 @@ import * as arrays from 'vs/base/common/arrays';
import * as collections from 'vs/base/common/collections'; import * as collections from 'vs/base/common/collections';
import * as glob from 'vs/base/common/glob'; import * as glob from 'vs/base/common/glob';
import { untildify } from 'vs/base/common/labels'; import { untildify } from 'vs/base/common/labels';
import { values } from 'vs/base/common/map';
import { Schemas } from 'vs/base/common/network'; import { Schemas } from 'vs/base/common/network';
import * as path from 'vs/base/common/path'; import * as path from 'vs/base/common/path';
import { isEqual } from 'vs/base/common/resources'; import { isEqual } from 'vs/base/common/resources';
...@@ -324,7 +323,7 @@ export class QueryBuilder { ...@@ -324,7 +323,7 @@ export class QueryBuilder {
} }
}); });
return values(searchPathPatternMap); return Array.from(searchPathPatternMap.values());
} }
/** /**
......
...@@ -9,7 +9,7 @@ import * as errors from 'vs/base/common/errors'; ...@@ -9,7 +9,7 @@ import * as errors from 'vs/base/common/errors';
import { Emitter, Event } from 'vs/base/common/event'; import { Emitter, Event } from 'vs/base/common/event';
import { getBaseLabel } from 'vs/base/common/labels'; import { getBaseLabel } from 'vs/base/common/labels';
import { Disposable, IDisposable, DisposableStore } from 'vs/base/common/lifecycle'; 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 * as objects from 'vs/base/common/objects';
import { lcut } from 'vs/base/common/strings'; import { lcut } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri'; import { URI } from 'vs/base/common/uri';
...@@ -293,7 +293,7 @@ export class FileMatch extends Disposable implements IFileMatch { ...@@ -293,7 +293,7 @@ export class FileMatch extends Disposable implements IFileMatch {
endLineNumber: lineNumber, endLineNumber: lineNumber,
endColumn: this._model.getLineMaxColumn(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())); oldMatches.forEach(match => this._matches.delete(match.id()));
const wordSeparators = this._query.isWordMatch && this._query.wordSeparators ? this._query.wordSeparators : null; const wordSeparators = this._query.isWordMatch && this._query.wordSeparators ? this._query.wordSeparators : null;
...@@ -351,7 +351,7 @@ export class FileMatch extends Disposable implements IFileMatch { ...@@ -351,7 +351,7 @@ export class FileMatch extends Disposable implements IFileMatch {
} }
matches(): Match[] { matches(): Match[] {
return values(this._matches); return Array.from(this._matches.values());
} }
remove(match: Match): void { remove(match: Match): void {
......
...@@ -7,7 +7,7 @@ import * as arrays from 'vs/base/common/arrays'; ...@@ -7,7 +7,7 @@ import * as arrays from 'vs/base/common/arrays';
import { CancellationToken } from 'vs/base/common/cancellation'; import { CancellationToken } from 'vs/base/common/cancellation';
import { canceled } from 'vs/base/common/errors'; import { canceled } from 'vs/base/common/errors';
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; 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 { Schemas } from 'vs/base/common/network';
import { StopWatch } from 'vs/base/common/stopwatch'; import { StopWatch } from 'vs/base/common/stopwatch';
import { URI as uri } from 'vs/base/common/uri'; import { URI as uri } from 'vs/base/common/uri';
...@@ -493,7 +493,7 @@ export class SearchService extends Disposable implements ISearchService { ...@@ -493,7 +493,7 @@ export class SearchService extends Disposable implements ISearchService {
clearCache(cacheKey: string): Promise<void> { clearCache(cacheKey: string): Promise<void> {
const clearPs = [ const clearPs = [
this.diskSearch, this.diskSearch,
...values(this.fileSearchProviders) ...Array.from(this.fileSearchProviders.values())
].map(provider => provider && provider.clearCache(cacheKey)); ].map(provider => provider && provider.clearCache(cacheKey));
return Promise.all(clearPs) return Promise.all(clearPs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册