提交 aab1c592 编写于 作者: R Rob Lourens

Use UriIdentityService for #110241

上级 a28b99d7
...@@ -31,6 +31,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur ...@@ -31,6 +31,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { compareFileNames, compareFileExtensions, comparePaths } from 'vs/base/common/comparers'; import { compareFileNames, compareFileExtensions, comparePaths } from 'vs/base/common/comparers';
import { IFileService, IFileStatWithMetadata } from 'vs/platform/files/common/files'; import { IFileService, IFileStatWithMetadata } from 'vs/platform/files/common/files';
import { Schemas } from 'vs/base/common/network'; import { Schemas } from 'vs/base/common/network';
import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity';
export class Match { export class Match {
...@@ -710,7 +711,7 @@ export class SearchResult extends Disposable { ...@@ -710,7 +711,7 @@ export class SearchResult extends Disposable {
private _folderMatches: FolderMatchWithResource[] = []; private _folderMatches: FolderMatchWithResource[] = [];
private _otherFilesMatch: FolderMatch | null = null; private _otherFilesMatch: FolderMatch | null = null;
private _folderMatchesMap: TernarySearchTree<URI, FolderMatchWithResource> = TernarySearchTree.forUris<FolderMatchWithResource>(); private _folderMatchesMap: TernarySearchTree<URI, FolderMatchWithResource> = TernarySearchTree.forUris2<FolderMatchWithResource>(key => this.uriIdentityService.extUri.ignorePathCasing(key));
private _showHighlights: boolean = false; private _showHighlights: boolean = false;
private _query: ITextQuery | null = null; private _query: ITextQuery | null = null;
...@@ -725,6 +726,7 @@ export class SearchResult extends Disposable { ...@@ -725,6 +726,7 @@ export class SearchResult extends Disposable {
@ITelemetryService private readonly telemetryService: ITelemetryService, @ITelemetryService private readonly telemetryService: ITelemetryService,
@IInstantiationService private readonly instantiationService: IInstantiationService, @IInstantiationService private readonly instantiationService: IInstantiationService,
@IModelService private readonly modelService: IModelService, @IModelService private readonly modelService: IModelService,
@IUriIdentityService private readonly uriIdentityService: IUriIdentityService,
) { ) {
super(); super();
this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations); this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations);
...@@ -755,7 +757,7 @@ export class SearchResult extends Disposable { ...@@ -755,7 +757,7 @@ export class SearchResult extends Disposable {
.then(() => this._isDirty = false); .then(() => this._isDirty = false);
this._rangeHighlightDecorations.removeHighlightRange(); this._rangeHighlightDecorations.removeHighlightRange();
this._folderMatchesMap = TernarySearchTree.forUris<FolderMatchWithResource>(); this._folderMatchesMap = TernarySearchTree.forUris2<FolderMatchWithResource>(key => this.uriIdentityService.extUri.ignorePathCasing(key));
if (!query) { if (!query) {
return; return;
...@@ -977,7 +979,7 @@ export class SearchResult extends Disposable { ...@@ -977,7 +979,7 @@ export class SearchResult extends Disposable {
private disposeMatches(): void { private disposeMatches(): void {
this.folderMatches().forEach(folderMatch => folderMatch.dispose()); this.folderMatches().forEach(folderMatch => folderMatch.dispose());
this._folderMatches = []; this._folderMatches = [];
this._folderMatchesMap = TernarySearchTree.forUris<FolderMatchWithResource>(); this._folderMatchesMap = TernarySearchTree.forUris2<FolderMatchWithResource>(key => this.uriIdentityService.extUri.ignorePathCasing(key));
this._rangeHighlightDecorations.removeHighlightRange(); this._rangeHighlightDecorations.removeHighlightRange();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册